If you have the version number, or the target release, apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from terminal by typing man apt-get
sudo apt-get install <package-name>=<package-version-number> OR
is the command to be run. This can be used to down-grade a package to a specific version.
Remark that when using a target release (option -t), the release priority must greater than 1000 to allow downgrades (see man 5 apt_preferences) otherwise the currently installed version will be kept.
It has been helpfully pointed out in the comments that
apt-cache showpkg <package-name> lists all available versions. (h/t Sparhawk)
apt-mark hold <package-name> "holds" the package at the current version, preventing automatic upgrades. (h/t Luís de Sousa )
In my opinion, you should first uninstall or purge the package, like:
sudo apt-get remove <package>
or
sudo apt-get purge <package>
Then, you may download the version you would like to install and keep it in a folder, say abc.deb in Downloads. Open terminal, move to the folder using cd command and install the previous version using dpkg:
sudo dpkg -i abc.deb
Or else, there is a small utility called ppa-purge if you mean to downgrade packages updated via PPAs.
This question is old but Google led me here and I didn't find simple solution that does't require manual version passing when downgrading a bunch of packages to an older release.
So maybe someone who also needs that will find my solution useful as well.
There's a tool called apt-show-versions that shows versions installed. To install it:
$ sudo apt install apt-show-versions
Make sure APT's cache is up to date:
$ sudo apt-show-versions -i
You can easily downgrade all required packages by fine-tuning the regex but here it is:
$ sudo apt-get install $(apt-show-versions \
| grep -P 'newer than version in archive' \
| awk -F: '{print $1"/'$(lsb_release -cs)'"}')
You should have lsb-release installed for the latter.
If you have the version number, or the target release,
apt-get
supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from terminal by typingman apt-get
sudo apt-get install <package-name>=<package-version-number>
ORsudo apt-get -t=<target release> install <package-name>
is the command to be run. This can be used to down-grade a package to a specific version.
Remark that when using a target release (option
-t
), the release priority must greater than 1000 to allow downgrades (seeman 5 apt_preferences
) otherwise the currently installed version will be kept.It has been helpfully pointed out in the comments that
apt-cache showpkg <package-name>
lists all available versions. (h/t Sparhawk)apt-mark hold <package-name>
"holds" the package at the current version, preventing automatic upgrades. (h/t Luís de Sousa )Use:
or:
Where:
«pkg»
is the name of the package.«version»
is the version number.If you have upgraded software using ppa you can downgrade it by using
ppa-purge
. First you have to installppa-purge
using this code:Then you can remove the ppa using command
this will automatically downgrade the software to its original version which shipped with Ubuntu.
In my opinion, you should first uninstall or purge the package, like:
or
Then, you may download the version you would like to install and keep it in a folder, say
abc.deb
in Downloads. Open terminal, move to the folder usingcd
command and install the previous version usingdpkg
:Or else, there is a small utility called
ppa-purge
if you mean to downgrade packages updated via PPAs.See this thread: http://www.webupd8.org/2009/12/remove-ppa-repositories-via-command.html
To downgrade you have to do a command like
in your terminal.
In the place of
version
put the previous version you want to downgrade to.This question is old but Google led me here and I didn't find simple solution that does't require manual version passing when downgrading a bunch of packages to an older release.
So maybe someone who also needs that will find my solution useful as well.
There's a tool called
apt-show-versions
that shows versions installed. To install it:Make sure APT's cache is up to date:
You can easily downgrade all required packages by fine-tuning the regex but here it is:
You should have
lsb-release
installed for the latter.