Arch Linux OS homepage
Some tips n tricks for using Arch Linux package manager "pacman".
Option | Action |
---|---|
pacman -S <PACKAGENAME> |
Install PACKAGENAME |
pacman -R <PACKAGENAME> |
Remove PACKAGENAME |
pacman -Rs <PACKAGENAME> |
Remove PACKNAME and its dependancies |
pacman -Scc |
Cleans the pacman cache |
pacman -Syu |
Sync local database and perform system upgrade |
pacman -Syyu |
Force sync local datase and perform system upgrade |
pacman -Q |
Queries all installated packages. Can be pipped into grep to find specific packages |
pacman -Qtdq |
Lists orphaned packages |
pacman -Qtdq | pacman -Rns - |
Removes orphaned packages |
These arguments can be used with
yay
Under the "Misc options" in /etc/pacman.conf, make the following changes
reflector --download-timeout 60 --country gb --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
. This will set reflector to use mirrors that do not timeout within 60 seconds, are based in the UK, updated within the last 12 hours, use HTTPS and use the lowest latency and finally saves the to the pacman mirror list. Arch based distributions may not use reflector. Manjaro is an example of this and it instead uses pacman-mirrors
which in my mind seems less granular. Command I use for this is pacman-mirrors --geoip
which will use your geo located public IP address to select the closest mirrors.