How to revert to a previous version of a program

Downgrade signal

On many occasions we install a package and after updating it we see that we do not like the new version for some reason or that it simply does not work as expected. For this reason, on many occasions we are forced to install a previous version, but you should know that for this it is not necessary to uninstall and reinstall a previous version, but you can do a downgrade, returning in a simple way to the previous version that you had installed before updating.

For this you will need to handle some of the package management tools that you have in your favorite distribution. Depending on whether your distro works with a package manager or another, the downgrade process could be different in each case. That is why I will explain with some practical examples in the case of the most used and well-known distributions. You will see that the process is simple, and making use of these tools and the package cache that is saved is possible:

Arch Linux and Arch-based (with Pacman):

In the case of wanting to do it from an Arch distro or based on it, that is, that uses the Pacman package manager, the procedure is this:

ls /var/cache/pacman/pkg/ | grep nombre_paquete

Where package_name is the name of the package that you want to revert to a previous version. Once this is done, we will obtain the cache versions and once the previous version is located, you can install it again with Pacman:

sudo pacman -U /var/cache/pacman/pkg/nombre_paquete-version.pkg.tar.xz

OpenSUSE and based on it:

For openSUSE and any distro based on it, we will use Zypper. And the procedure is the same, first we search the cache and then install the version you want:

cat /var/log/zypp/history | grep nombre_paquete

sudo zypper -in -f nombre_paquete-version

Debian and derivatives (APT):

We go now with the other big group, with the distros based on Debian and also Ubuntu itself and based on it, there are and many. First we look at the cache versions we have:

sudo apt-cache showpkg nombre_paquete
And now we are going to install the version you want, with package_name being the one in your case and xz the desired version, for example 7.53:
sudo apt install nombre_paquete=x.z

I hope it helps…


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.