Same question as how-to-downgrade-a-package-via-apt-get, except what if it's on a newly deployed server and the archived .deb is not there?

For example, https://launchpad.net/ubuntu/precise/amd64/wget tells me the previous version is 1.13.4-1ubuntu2, and I have 1.13.4-2ubuntu installed:

$ dpkg -l | grep wget
ii  wget                            1.13.4-2ubuntu1            retrieves files from the web

When I try to force the version:

vagrant@es2:~$ sudo apt-get install wget=1.13.4-1ubuntu2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '1.13.4-1ubuntu2' for 'wget' was not found

Is there a way to "ask" apt-get update to fetch information/URLs/etc. about older versions?

Is the solution to run my own apt repository with the versions I want?

wget http://launchpadlibrarian.net/85655688/wget_1.13.4-1ubuntu2_i386.deb


--08:29:45--  http://launchpadlibrarian.net/85655688/wget_1.13.4-1ubuntu2_i386.deb
           => `wget_1.13.4-1ubuntu2_i386.deb'
Resolving launchpadlibrarian.net...,
Connecting to launchpadlibrarian.net||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 282,988 (276K) [application/x-debian-package]

100%[====================================================>] 282,988      445.03K/s

08:29:46 (443.76 KB/s) - `wget_1.13.4-1ubuntu2_i386.deb' saved [282988/282988]

As long as you have an internet connection you can wget all the debs you want. After this you can try to install it with USC (might not work due to dependencies) or with dpkg but you might need to wget the dependencies 1st too.

In this case wget ...

Package relationships. Depends on

dpkg (>= 1.15.4)
libc6 (>= 2.11)
libidn11 (>= 1.13)
libssl1.0.0 (>= 1.0.0)

Package relationships. Conflicts


By the way: I searched https://launchpad.net for wget 1.13.4-1ubuntu2 and use the link on this page https://launchpad.net/ubuntu/precise/i386/wget/1.13.4-1ubuntu2 to locally download the file named wget_1.13.4-1ubuntu2_i386.deb (276.4 KiB).

In theory you can create the download from memory for other files.

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.