Here is the list of useful commands for pacman. Pacman is a package manager for Arch Linux.
Whether you use x86, amd64, or ARM architecture, the command should remain same.
Update Package List
The repository is consists of many package. To update the package list, we do:
This will update all packages on the system.
Perform Full Upgrade
This is necessary if some libraries are missing to recompile system properly.
Install New Package
Install specific package.
pacman -S $PACKAGE
where $PACKAGE is the package name you want to install. For example: xorg-server
Install package groups
pacman -Sg $PACKAGEGROUP
where $PACKAGE is the package group. For example: gnome.
Remove package, normally.
pacman -R $PACKAGE
where $PACKAGE is the package name you want to remove. This will remove a single package and leaving all of its dependencies installed.
If you want to remove a package and its dependencies which are note required by any other package, do following:
pacman -Rs $PACKAGE
If you want to remove a package, its dependencies, and all of the dependent (packages depend on it)
pacman -Rsc $PACKAGE
Search for Package
Will search the package database on given keyword
pacman -Ss $KEYWORD
where $KEYWORD is the keyword, can be parts of package name, description, etc.
List of Package Installed
List of packages
List the package installed with given keyword
pacman -Q | grep $KEYWORD
List the packages installed as dependencies but not used anymore.
List the packages installed, and not needed by other packages (not bein depended on)
List of files installed with package (content of package)
pacman -Ql $PACKAGEarch linux, linux, tools