Pacman

From Dev Wiki
Jump to navigation Jump to search

Similar to Apt-Get, pacman is a command line interface to update and install packages on a Arch Linux system.

For a list of useful packages to install via Pacman, see Pacman Packages.


Installing Packages

To install a new package, run:

sudo pacman -S <package_name>

However, it's strongly recommended to run system updates with package installs:

sudo pacman -Syu <package_name>

See Pacman Packages for common packages.


Updating Packages

To update the known package database:

sudo pacman -Syy

To apply package updates:

sudo pacman -Syu


Listing Installed Packages

To show all packages installed through apt:

pacman -Qs

To limit output to a given package name (or partial name):

pacman -Qs <partial_package_name>


Searching through Known Packages

If you don't know the exact name of a program you want to install, you can search through pacman's known repositories with the following:

pacman -Ss <keyword>

Where <keyword> is the string to compare with.

  • Ex: If you want to see what nvidia drivers are available, you can type pacman -Ss nvidia to display all matches with "nvidia".


Uninstalling Packages

If you installed a package through pacman, you can remove it by running the command:

sudo pacman -R <package_name>

To also uninstall any package dependencies:

sudo pacman -Rs <package_name>


Enabling AUR Packages

Depending on your version of Arch Linux, you may need to enable "AUR packages" in order to find the package you want. In Manjaro, this can be enabled as a preference in the software manager GUI.

Basically, AUR means "non-official, community maintained packages" and some (most?) Arch Linux distros will disable them by default.

For example, Google Chrome is considered an "AUR package" because it is not open source (this is also why FireFox generally comes preinstalled on Linux distros, but Chrome does not).