The pacman package manager is one of the major distinguishing features of Arch Linux. The goal of pacman is to make it possible to easily manager package, whether they are from the official repository or built by user.
In this guide we will show you how to use pacman effectively to manager all your packages in your Linux systems.
Listing Packages
1. Listing all packages installed in your system
$ pacman -Q
aalib 1.4rc5-13
accountsservice 0.6.54+2+g204a4ab-1
acl 2.2.53-1
adwaita-icon-theme 3.30.1-1
alsa-lib 1.1.7-2
alsa-utils 1.1.7-1
...
2. Listing all foreign packages(manually downloaded and installed packages)
$ pacman -Qm
jmtpfs 0.5-2
ttf-ms-fonts 2.0-10
yaourt 1.9-1
...
3. List all the packages in the group
$ pacman -Sg "your group name"
4. List all packages along with their individual sizes and sort them
$ pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
1024.00B ca-certificates
1024.00B xorg-font-utils
2048.00B java-environment-common
3.00KiB pambase
3.00KiB vte-common
...
Installing Packages
1. Simple Installation
# pacman -S package_name
2. Install package from a list
# pacman -S --needed - < pkglist.txt
3. Install a downloaded package or a local package
# pacman -U /path/package_name.pkg.tar.xz
Updating Packages
1. Updating your packages to latest version
# pacman -Syu
2. Updating and ignoring a package or a group
The following changes should be done in your configuration file: /etc.pacman.confFor ignoring a package
IgnorePkg=package_name
For ignoring a group
IgnoreGroup=package_group
Removing Packages
1. Remove a package
# pacman -R package_name
2. Remove a package with dependency that are not being used
# pacman -Rs package_name
3. Removing a package and its configuration files
# pacman -Rn package_name
4. Removing unused packages
# pacman -Rns $(pacman -Qtdq)
Cleaning Packages
1. Cleaning the cache
# pacman -Sc
Comments
Post a Comment