pacman usage in brief

pacman is the canonical package manager for Arch Linux and all Linux distributions built on it -- such as Manjaro.

Recommended Usage Commands of pacman

sudo pacman -Syyu

is a command we use to update and upgrade all packages (programs) installed on the Linux system.

sudo pacman -Rns package-name

is a command we use to remove / uninstall a specific package (program) from our Linux system. for example; sudo pacman -Rns emacs which will remove the emacs program and all its dependencies (which are not needed for other programs).

pacman -Ss package-name

we use this command to search for a package or program.

pacman -Q

this command lists all the installed packages on our system.

pacman -Qe

lists all packages you installed (not dependencies). You may be interested in those packages more than the large number of actually installed ones.

pacman -Qeq

It is the same command as the previous one but with a q added. That little q means "show the package name only" which means the package details will not be shown. It is important for the developers and tinkerers in the Linux world.

pacman -Qm

list all installed packages from AUR only.

pacman -Qmq

it is the same command as the previous one but with a little q which means "show the package name only".

pacman -Qdt

shows all unneeded installed packages. Those packages are dependencies which are no longer needed for any currently-installed program / package.

pacman -Qs emacs

search for a package in the local repositories (aka Local Search).

sudo pacman -Sc

Arch Linux and all Linux distributions built on it has a way to maintain stability which is the package / program history. The system keep the last two (or more) versions of the same package / program to revert to them when the new one doesn't work. Those packages are saved locally and known as cache. We can remove that cache (the kept old packages) by this command we mentioned.

If you are out of disk space and everything works fine, then use the command to gain some disk space.

To see this page later, search for "pacman value in brief" or bookmark this webpage on your internet browser. If you want to get new posts, make sure to subscribe to Value In Brief by Email.