What's pacman? Pacman is a package management system, similar to apt-get/aptitude on Ubuntu and RPM on other distros such as openSUSE and Fedora. You could say that a package is a program put into a box, and contains a list of dependencies and other info with it on the "order list". If you prefer using a GUI, some frontends have been made by the community. Pacman is very easy to use, as you will see.
Package Management
To install a package, including it's dependencies, there is one simple command, which must be run as root: pacman -S <include package name here> To search for a package in the repos: pacman -Ss <include package name here> To remove a package, and all of it's dependencies, all you have to do is: pacman -Rs <include package name here> To remove a package and keep it's dependencies installed, you would do: pacman -Rd <include package name here> To remove everything about a package, run pacman -Rsc kdelibs This would remove all dependencies of the KDE libraries and everything that depends on it. To force a stubborn package to install: pacman -Sf <include package name here> And to sync the repos and update old packages, you only need one command: pacman -Syu
Queries
Sometimes you may want to find out about what files are owned by a package or which packages are installed. Pacman makes this easy.
Showing which packages are installed
This shows a list of packages (including version numbers) which are installed on your system. You can filter this with the command grep. pacman -Q | grep firefox The following shows a list of the packages installed, but doesn't display the version numbers. pacman -Qq pacman -Qs This shows all of the packages installed with descriptions of each under them. You can filter them by typing something after it like so: pacman -Qs kde would search for all packages with kde in the name and/or description. pacman -Ql This shows all files installed by all of the packages you have installed. pacman -Ql <insert name of package here> This shows the all of the files owned by the named package. pacman -Qo <insert name of package here> <insert name of file here> This can help you find which package is owned by a specified file. You can find even more commands by executing pacman --help -Q and for even more commands, run man pacman
Advanced Configuration
Let's say you want to make pacman download packages using wget. All you have to do is edit your /etc/pacman.conf and uncomment the line:
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
Pacman keeps downloading from ftp.archlinux.org... but that's throttled! You can edit your pacman.conf yet again by adding a few lines. For example, I want to stop using the ftp.archlinux.org mirror and I have an i686 architechure. All I do is add/edit these lines to my /etc/pacman.conf:
[core]
Server = <Insert your preferred server here>/core/os/i686
Include = /etc/pacman.d/mirrorlist[extra]
Server = <Insert your preferred server here>/extra/os/i686
Include = /etc/pacman.d/mirrorlist
[community]
Server = <Insert your preferred server here>/community/os/i686
Include = /etc/pacman.d/mirrorlist
A list of mirrors can be found here: http://wiki.archlinux.org/index.php/Mirrors From pacman 3.1.0, you can now fine tune your configuration file even more. When you upgrade to 3.1.0 or higher, first open your pacman.conf nano /etc/pacman.conf You can replace nano with your own text editor of choice. Now insert the following lines
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
If you want, you can choose where you want your cache (CacheDir), your database path (DBPath), where you would like pacman to install your packages to (RootDir) and where it should log to (LogFile). Remember to uncomment them (remove the hash).
GUI frontends to Pacman
Some GUI frontends to Pacman have been produced by various people in the Arch Linux community. Here is a list of them.
Shaman
"Shaman is not just another GUI for Pacman. It is based on Qt and libalpm, and with an interface designed both for the experienced and the beginner user. Its tight integration with Pacman grants all operation to be performed at the same speed of Pacman, and QT integration allows fast and advanced searches."
http://chakra-project.org/tools-shaman.html
It is available in the "community" repository. Simply execute pacman -S shaman to install it.
gtkPacman
"gtkPacman is a simple, but powerful frontend to the ArchLinux pacman. It’s written in python, using pygtk, then it’s fast and stable. With gtkPacman system management becomes matter of a button press."
You can install it via the AUR. It is called "gtkpacman" and "gtkpacman-svn" for the development version. See my guide for installing programs from the AUR.