Using Downgrade

From Manjaro Linux
Jump to: navigation, search


What's downgrade?

It is a very easy to use terminal program that enables you to downgrade packages from your system cache or from the Arch Linux Archive - A.L.A (formally the Arch Linux Rollback Machine - A.R.M) database. So providing the package isn't so old or obscure that it isn't in the database you have fair chance of finding it with Downgrade.


Installing Downgrade

First you need to install Downgrade, which is available in the official repositories of Manjaro. Via the terminal enter the following command:

sudo pacman -S downgrade

You can also install a newer version from the AUR if necessary:

yaourt -S downgrade


Using Downgrade

Then run the following command, it will only show you the package versions that are in your cache (I'll use firefox in this example):

downgrade firefox

This is what I get when I run the above command on my machine, notice that I then instead of using q I instead entered s to search the A.L.A database. This then shows all of the versions that are available there:


[handy@jarmano ~]$ downgrade firefox

The following packages are available in your cache:

   1)  local              firefox-26.0-2-x86_64.pkg.tar.xz [installed]
   2)  local              firefox-26.0-1-x86_64.pkg.tar.xz

please choose a version, [s]earch A.L.A or [q]uit: s

The following packages are available from the A.L.A.:

   1)  extra              firefox-26.0-2-x86_64.pkg.tar.xz [installed]
   2)  extra              firefox-26.0-1-x86_64.pkg.tar.xz
   3)  extra              firefox-25.0.1-1-x86_64.pkg.tar.xz
   4)  extra              firefox-25.0-1-x86_64.pkg.tar.xz
   5)  extra              firefox-24.0-1-x86_64.pkg.tar.xz
   6)  extra              firefox-23.0.1-1-x86_64.pkg.tar.xz

please choose a version or [q]uit: 

You enter the number at the beginning of the line to install the desired version of the software that you want (being firefox in the above example).


note: If you are in stable branch ALA is disable by default because potentially dangerous ( a message warning you ). If needed, you can enable it by setting the environment variable DOWNGRADE_FROM_ALA to 1. See man downgrade for further details


Downgrade offers to edit your /etc/pacman.conf for you

The following is from the Downgrade man page' (which will be displayed if you type man downgrade at the terminal prompt):

IGNORING PACKAGES
      As it is common to add a package to the IgnorePkg directive in one’s pacman configuration
       after downgrading, downgrade offers to do this for you automatically.

      The process is skipped if the package name is already present in IgnorePkg.

What this means is that if you choose to allow Downgrade to add a package name to the IgnorePkg line in your /etc/pacman.conf (which is what you should normally do). You need to remember to remove the blocked packages name from the /etc/pacman.conf when you choose to upgrade the package again. If you don't remove the packages name from the IgnorePkg line in your /etc/pacman.conf then you will not be able to upgrade the package.


A Caveat

The packages that you install from the Arch Linux Archive are Arch packages. This means that there is the possibility that they may be a different version than that being used by Manjaro & require different versions of one or more dependencies.

This won't happen often, but it will happen.


Related wiki pages on Downgrading

The Arch Linux Archive wiki page contains information appropriate for those needing to set their machine up to use the appropriate packages from a certain date: [1]

Orphan Package Removal: [2]

Maintain Pacman's Cache: [3]

Allservers: [4]


Support

Following is a link to this page's forum counterpart where you can post any related feedback: [5]