How to manage packages using Pacman in Arch Linux
Pacman is the default package manager for Arch Linux. Pacman uses tarballs (.tar) packages as a software source. Those packages are built to be compatible with Arch Linux Build System (ABS). Pacman repositories do not have as many packages as repositories of the most popular distributions (like Debian, Ubuntu, Fedoram or Suse).
The configuration file of Pacman is pacman.conf. It is located in /etc directory. This file contains e.g. repositories addresses or localization of the log file..
What Does Pacman Do?
Pacman can install, remove and update packages on your arch linux system. Much like yum in Fedora or apt-get in Ubuntu/Debian, it can perform many other fucntions as well, such as updating your whole system, clean the cache from package installation, display information about installed packages, and run queries against the Arch repositories.
Pacman Commands
- To install a package while syncing the local database for system packages.
- pacman -Sy package_name
- To install a package with it’s dependencies
- pacman -S package_name
- To display a package list in a repository
- pacman -Sl repository_name
- To remove a package without dependencies
- pacman -R package_name
- To remove a package and it’s dependencies
- pacman -Rs package_name
- To completely purge a package from your system
- pacman -Rn package_name
- To update all the packages in your entire system
- pacman -Su
- To update your entire system and sync the local package database
- pacman -Syu
- search for all packages matching the keyword
- pacman -Ss keyword
- To obtain information about a particular package
- pacman -Qi package_name - information about package
- List the files within a particular package
- pacman -Ql package_name
- To search for file installed on your system by a package
- pacman -Qs package_name - search files installed on hard disk
- To download a package, but without installation
- pacman -Sw package_name
- To install a local package downloaded to your system
- pacman -A /file/path/file.tar
- To clean the cache for the system
- pacman -Scc
Repository entry consist of the repository name (in brackets ‘[]’) and server address (after ‘Server=’), Here’s an example from /etc/pacman.conf
[repository_name]
Server = ftp://server.com/repo
After you add a new repository you should refresh repositories list using the following command:
pacman -Sy














Post a comment