Downgrading packages with pacman
Solution 1
Generally speaking unless there is a dep depending on it (in which case leaving it that way would break something), pacman -U <older-stable-package-pkg.tar.gz>
will do the job correctly. Also you should avoid -Rd
when doing things that could break your system unless You know what you are doing, because otherwise the system will complain if you're trying to downgrade in a way that will break a dependency.
Solution 2
If you have packages with a newer version (i.e. testing) and you want to downgrade in batch to stable version, you can execute the following pacman commands:
Refresh the sync databases:
# pacman -Syy
Downgrade all packages with a lower version in the repos:
# pacman -Suu
Related videos on Youtube

Comments
-
Stefan 8 months
What is the best, or most suitable, method of downgrading packages in Arch?
On normal days I just run the following to accomplish a quick downgrade:
# pacman -Rd <broken-package> # pacman -U <older-stable-package-pkg.tar.gz>
But today I am downgrading my kernel, which is a very vital part of my linux life. I'd like to do it correctly.
Is this the proper way? If not, what is?
-
jasonwryan almost 12 yearsPresumably, you meant to include a line about removing the [Testing] repos from your
/etc/pacman.conf
first. Otherwise, this will not downgrade anything... -
juanmah almost 12 yearsI don't agree. If you remove the testing repo you will keep your testing packages until it appears new version in the other repos. The way I proposed let you select manually testing packages, and automatically update only normal repos (lower version in the database), furthermore downgrading testing packages if any.
-
jasonwryan almost 12 yearsYou misunderstand my comment.
pacman -Syy
force syncs the db against the repos inpacman.conf
- unless you changepacman.conf
nothing will be donwgraded. Readman pacman
for details. -
juanmah almost 12 yearsYou've missunderstood the aim of
pacman -Suu
. You don't need to changepacman.conf
. You shall have more than one version of packages in repos to getpacman -Suu
working. If you have only one version of every packagepacman -Suu
is useless, of course.pacman -Suu
downgrades to the lower version of packages in the repos. -
jasonwryan almost 12 years
man pacman: -Su
: "Pass this option twice to enable package downgrade; in this case pacman will select sync packages whose version does not match with the local version. This can be useful when the user switches from a testing repo to a stable one." That seems clear to me.