Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
+1... answer gets accepted when my kernel is safely downgraded... –  Stefan Oct 17 '10 at 7:24

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
share|improve this answer
3  
Presumably, you meant to include a line about removing the [Testing] repos from your /etc/pacman.conf first. Otherwise, this will not downgrade anything... –  jasonwryan Jun 30 '11 at 18:32
    
I 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. –  juanmah Jul 12 '11 at 17:01
    
You misunderstand my comment. pacman -Syy force syncs the db against the repos in pacman.conf - unless you change pacman.conf nothing will be donwgraded. Read man pacman for details. –  jasonwryan Jul 12 '11 at 18:26
    
You've missunderstood the aim of pacman -Suu. You don't need to change pacman.conf. You shall have more than one version of packages in repos to get pacman -Suu working. If you have only one version of every package pacman -Suu is useless, of course. pacman -Suu downgrades to the lower version of packages in the repos. –  juanmah Jul 13 '11 at 8:58
    
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. –  jasonwryan Jul 13 '11 at 9:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.