Updating


When you fetch or install a package with Pacman, Pacman also records which cache the package came from. If the package then changes, over time, Pacman has the ability to re-fetch the package and compare it to what's in your local installation. If there is a difference, Pacman indicates that an update of the package is available. As a user of Pacman, you can see if such updates are available, view the differences and then update the software you so choose. Pacman will never update installed packages without your explicit permission.

To give an example of this procedure, we have to install from a cache where you can modify the contents yourself. To do this, cd to a new working directory and do

% pacman -get $PACMAN_LOCATION/democache:FooPackage
This installs FooPackage from a sample cache that comes with your copy of Pacman. Now edit the file $PACMAN_LOCATION/democache:FooPackage.pacman and change something, for instance the message in the message command. Then go back to your installation and do
% pacman -update-check
% pacman -l
You will see that the package FooPackage has an update available. To view the original source compared with the update, do
% pacman -d src ups 0 -l
and Pacman will display both the current source code (that's what the -d src switch does) and the updated source code (that's what the -d ups switch does).

If, after these considerations, you decide that you want to update your installation, just do

% pacman -update
and Pacman will remove FooPackage and re-install the new FooPackage.

When Pacman does updating, it may also have to remove and re-install other packages in order to do the update properly. For example, if other packages have configured FooPackage, Pacman would have to remove and re-install those packages as well. For this reason, if you update, you will sometimes see other packages being re-installed besides the package that has actually changed.


Pacman Headquarters