I am trying to install a previous version of subversion from snapshot.debian.org, as described in How to install the previous version of a .deb package and pin it?. I have setup the repository and the pinning as I believe to be correct, but it is not working as I expected, as the apt-cache-policy output shows. Where are the errors in it?


# snapshots.debian.org                                          
# added for subversion 1.9.2 subversion bug #803725             
deb http://snapshot.debian.org/archive/debian unstable main 


Package: subversion
Pin: origin snapshot.debian.org
Pin: version 1.9.2-1
Pin-Priority: 700

apt-cache policy subversion

  Installed: (none)
  Candidate: 1.9.2-3
  Package pin: (not found)
  Version table:
     1.9.2-3 700
        500 http://http.debian.net/debian/ unstable/main amd64 Packages
  • Thomas Dickey's answer may have provided a working solution, but I'd like to know if there's an answer to the question posed in the title. i.e. can you base a pin on both the origin and the version. – mc0e Oct 31 '16 at 13:21

I think the problem is that you cannot use snapshot.debian.org directly as a source of packages. To see this, select a URL from that site as the source in sources.list, e.g.,

deb http://snapshot.debian.org/archive/debian/20151018T155352Z/ testing main
deb-src http://snapshot.debian.org/archive/debian/20151018T155352Z/ testing main

(commenting out the other settings), and doing

apt-get update

to force it to use only that source (as done in Downgrade and force some packages on Debian to a previous version). When I do this, I get

$ apt-get update
Hit http://snapshot.debian.org testing InRelease
E: Release file for http://snapshot.debian.org/archive/debian/20151018T155352Z/dists/testing/InRelease is expired (invalid since 16d 9h 47min 8s). Updates for this repository will not be applied.

That was the last snapshot before 1.9.2-2 was released. Instead, found in a mailing list reply Re: Plasma 5 doesn't start after update on Stretch by Matthias Bodenbinder, he suggested

  • downloading the specific version needed
  • install the package, i.e., using dpkg
  • pin the (now-installed) package (his example uses no origin).

To test the instructions, I used these links from the initial release of subversion_1.9.1-1:

and installed them:

$ dpkg -i libsvn1_1.9.1-1_amd64.deb subversion-tools_1.9.1-1_amd64.deb subversion_1.9.1-1_amd64.deb
dpkg: warning: downgrading libsvn1:amd64 from 1.9.2-2 to 1.9.1-1
(Reading database ... 371500 files and directories currently installed.)
Preparing to unpack libsvn1_1.9.1-1_amd64.deb ...
Unpacking libsvn1:amd64 (1.9.1-1) over (1.9.2-2) ...
Preparing to unpack subversion-tools_1.9.1-1_amd64.deb ...
Unpacking subversion-tools (1.9.1-1) over (1.9.1-1) ...
Preparing to unpack subversion_1.9.1-1_amd64.deb ...
Unpacking subversion (1.9.1-1) over (1.9.1-1) ...
Setting up libsvn1:amd64 (1.9.1-1) ...
Setting up subversion (1.9.1-1) ...
Setting up subversion-tools (1.9.1-1) ...
Processing triggers for libc-bin (2.19-22) ...
Processing triggers for man-db (2.7.4-1) ...

Then (in /etc/apt/preferences.d/subversion):

Package: libsvn1
Pin: version 1.9.1-1
Pin-Priority: 1000

Package: subversion-tools
Pin: version 1.9.1-1
Pin-Priority: 1000

Package: subversion
Pin: version 1.9.1-1
Pin-Priority: 1000

and finally

$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ftp.us.debian.org/debian/ testing-updates/main Translation-en
 500 http://ftp.us.debian.org/debian/ testing-updates/main amd64 Packages
     release o=Debian,a=testing-updates,n=stretch-updates,l=Debian,c=main
     origin ftp.us.debian.org
 500 http://security.debian.org/ testing/updates/main Translation-en
 500 http://security.debian.org/ testing/updates/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian-Security,c=main
     origin security.debian.org
 500 http://ftp.us.debian.org/debian/ testing/main Translation-en
 500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=main
     origin ftp.us.debian.org
Pinned packages:
     subversion -> 1.9.1-1
     libsvn1 -> 1.9.1-1
     subversion-tools -> 1.9.1-1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.