The Rules
  • Feel free to leave constructive criticism, or point out a better way to do something.
  • Personal attacks or flames, on me or anyone else, will be deleted.
  • Past history has shown that 99% of comments I can't read (i.e. those in other languages) to be spam. Therefore, any comment I can't read will be removed.
  • I'm pretty mellow concerning profanity, but excessive (as determined subjectively by me), bad language will be removed.

Friday, April 30, 2010

Downgrading packages in Arch Linux

On occasion (actually today was the first time) there is need to downgrade a package in Arch Linux. Yesterday I did a `pacman -Syu`, which upgraded gcc from 4.4.3 to 4.5.0. Today, I learned that 4.5.0 is unable to compile Moab. You'd think that a new release of your trusty compiler would work at least as good as the last one, but that's a topic (spelled R-A-N-T) for another day. When this catastrophe strikes, you can do the following to recover.


1. On my Arch system, package files are kept in /var/cache/pacman/pkg. Go there.

2. Find the desired package. In this particular case, /var/log/pacman.log told me that yesterday I upgraded from 4.4.3-2 to 4.5.0-1. So my working compiler up until yesterday was gcc 4.4.3.

3. "Upgrade" to the desired package: `pacman -U gcc-4.4.3-2-x86_64.pkg.tar.xz` and `pacman -U gcc-libs-4.4.3-2-x86_64.pkg.tar.xz`

4. Also in my case I'll want to stick with gcc 4.4.3 for a while now, so you can modify the IgnorePkg line in /etc/pacman.conf as follows:

IgnorePkg = gcc gcc-libs

This causes pacman to skip over gcc and gcc-libs when you do a system-wide upgrade (mine prints a warning to say it's being ignored, which I don't consider to be a bad thing).

1 comment:

Anonymous said...

2010-08-20
you have to downgrade

cloog-ppl-0.15.8-1-x86_64.pkg.tar.xz
gcc-4.4.3-2-x86_64.pkg.tar.xz
gcc-libs-4.4.3-2-x86_64.pkg.tar.xz
libmpc-0.8.1-2-x86_64.pkg.tar.xz
mpfr-2.4.2-2-x86_64.pkg.tar.xz
ppl-0.10.2-3-x86_64.pkg.tar.xz

can be taken at http://se-jpg-01.files.syntaxerror.nu/pub/os/linux/archlinux/core/os/x86_64/