- Q: I just ran pacman -Syu and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?
- A: There is not yet support for rolling back packages in pacman itself. You can only install the latest and greatest packages. This is an effect of Arch's rolling release system.
You may be able to downgrade the package trivially by visiting /var/cache/pacman/pkg on your system and seeing if the older version of the package is stored there. (If you haven't run pacman -Scc recently, it should be there). If the package is there, you can install that version using pacman -U pkgname-olderpkgver.pkg.tar.gz
If you can't find older versions on your system check one of these mirrors:
- http://phraktured.net/archmirror/ (Note that this cannot be used as an Arch mirror in your pacman.conf, you have to manually download any packages.)
If the package is not located there, you will need to compile the older version yourself. To do this you will need a PKGBUILD for the file; you could edit the existing PKGBUILD provided by ABS to use older sources, or you can visit http://www.archlinux.org/packages/ and search for the package you wish to downgrade. Once you find it, click "View CVS entries" and select a diff with a previous revision (ie: for the revision you are interested in). If you use a "side by side" diff, you can copy and paste the entire PKGBUILD into a file and build it with makepkg.
Stopping Pacman from Updating Certain Packages
- Q: How do I stop Pacman from upgrading downgraded packages?
- A: With the 'IgnorePkg' variable in your pacman.conf.
'IgnorePkg = package ...' in your pacman.conf instructs Pacman to ignore any upgrades for selected packages when performing a --sysupgrade.
Reverting to a Savepoint
- Q: I want to go back to how my system was yesterday.
- A: It's easy provided you enabled periodic snapshots.
You can rely on a logical volume manager (LVM) for creating and maintaining snapshots. These snapshots should not be confused with CVS snapshots. LVM snapshots are kernel-level filesystem snapshots that, unlike a full backup, use a COW (copy-on-write) scheme which means that it occupies very little disk space so long as no files were modified, and if files were modified, the snapshot occupies only a little more than the disk space needed to store the pre-modified files. This usually means that you can snapshot a 35GB system with only 2GB free space, considering that pacman -Sy will likely modify far less than 2GB of data. If the state of your system after the upgrade is undesirable, you can quickly rollback to previous snapshot images of your system.