1. Basics

Frugalware comes with Pacman-G2 package manager. Pacman-G2 is a fork of the not-yet-released cvs version of the complete rewrite of pacman-g1 by Aurelien Foret (the old monolithic pacman-g1 is written by Judd Vinet). See the README for details. If you want to do anything with packages, you’ll always have to use the pacman-g2 command. Here are some basic actions with pacman-g2:

Actions usually used with remote installation from an FTP server:

# pacman-g2 -Sy

Updates the package database. Before searching for packages or installing them from an FTP server, you will have to use this command.

# pacman-g2 -Su

Upgrades all packages that are currently installed but a newer version of the package is available on the FTP server.

# pacman-g2 -Syu

The combination of the above two, that is the command most users use daily.

$ pacman-g2 -Sup

Prints the URL of all packages that pacman-g2 should download. This way you can download the packages anywhere and then just copy them to /var/cache/pacman/pkg. This is very useful if you have limited bandwidth at your computer, but you can access high bandwidth elsewhere.

# pacman-g2 -S sendmail

Installs sendmail with all of its dependencies from the FTP server. If it conflicts with any package, you will be asked if pacman-g2 is allowed to remove them.

$ pacman-g2 -Ss perl

Searches in the package database (on the FTP server). This example will probably display the perl package and all perl modules. Regular expression based search is also supported.

Of course, you can treat packages as normal files, and you can manually add/remove/etc them. Here are some examples:

# pacman-g2 -U zsh-4.2.1-1.fpm

Adds (or if it’s already installed, upgrades) the zsh package, which is located in the current directory.

# pacman-g2 -R qt

Removes the qt package.

$ pacman-g2 -Qs perl

Shows every installed packages whose name contains the string perl.

Generally, if you want to turn off checking for conflicting files, you should use the -f parameter, and if you want to turn off all dependency checking, you should use the -d switch.

$ pacman-g2 -h

This displays all the switches we discussed above, and a lot more. Once again, these are only the basics. You can also use pacman-g2 -Sh or similar to get help on a particular task.

Note
Full documentation for pacman-g2 can be reached by issuing man pacman-g2.

2. Apt - pacman-g2 cross reference

For those who are familiar with the apt package management tool, here is a quick cross-reference.

Action Apt command Pacman-G2 command

Refresh the package database:

apt-get update

pacman-g2 -Sy

Upgrade currently installed packages:

apt-get upgrade

pacman-g2 -Su

Install a new package:

apt-get install foo

pacman-g2 -S foo

Remove a package:

apt-get remove foo

pacman-g2 -Rc foo

Search in the full package database:

apt-cache search foo

pacman-g2 -Ss foo

Install a package from a file:

dpkg -i foo.deb

pacman-g2 -A foo.fpm

Clean the package cache:

apt-get clean

pacman-g2 -Sc