pacman
config
Note
find the official documentation at man.archlinux.org
to edit:
# nvim /etc/pacman.conf
suggested changes:
uncomment the following lines to enable these featuresColorParallelDownloads = 5if you wish to install steam using pacman also uncomment these lines
multilib is for 32-bit packages, which steam still is[multilib]Include = /etc/pacman.d/mirrorlist
cheatsheet
Note
find the official documentation at man.archlinux.org
to just update the package index:
# pacman -Sy
to update the package index and upgrade all packages (system upgrade):
the second-uenables downgrades if needed - you want this# pacman -Syuu
to install a package:
if you don’t know the exact name you can first search with-s$ pacman -Ss [search-term(s)]you should update the package index (if you haven’t v recently) first.
if the install fails, do a system upgrade before troubleshooting.# pacman -S [exact-package-name]
to uninstall a package:
# pacman -Rns [exact-package-name]-nprevents the creation of backup files-sdeletes unique dependancies
to clean the package cache:
only remove cached packages which are no longer installed# pacman -Scremove all cached packages
# pacman -Scc
to get info on a package:
only remove cached packages which are no longer installed$ pacman -Si [exact-package-name]
list installed packages:
lists all installed packages and their installed version number$ pacman -Q[[metdnls]] [[search-term (if using -s)] xor [exact-package-name]]
using-mlists only ‘foreign’ packages (usually these are aur packages)
using-elists only explicitly installed packages
using-tlists only packages which no other package depends on
using-dlists only packages which other packages depend on
using-nlists only ‘native’ packages (excludes aur packages)
using-llists the files owned by the selected packages
using-ssearches for a search-term instead of an exact package name
remove orphaned packages safely:
you can use this command to get a list of orphans to uninstall yourself$ pacman -Qtd
Caution
the following section(s) contain(s) instructions which risk breaking your system
remove orphaned packages quickly and easily, but a typo could cost you dearly:
the first half collects a list of orphans
the second half takes the list and uninstalls all of them
if you pass the wrong list to the second half, the wrong things will get deleted$ pacman -Qtd | sudo pacman -Rns -
it’s recommended to alias it in your ~/.bashrc file instead of typing it each time