Pacman
2022-04-20 - psic4t
When I migrated from Ubuntu to Arch I had a hard time remembering Pacman's (the Arch package manager) commands. Here we go:
- pacman -Sy updates the package lists
- pacman -Su upgrades the system
- pacman -Syu updates and upgrades
- pacman -Ss
searches for installable packages - pacman -R
removes a package - pacman -Rs
removes a package and its dependencies - pacman -Qi
shows info about an installed package - pacman -Ql
list all files of an installed package - pacman -Qm show all installed AUR packages
- pacman -Qo /path/to/filename shows which package a file belongs to
- pacman -Qe lists all packages explicitly installed
- pacman -Qd lists all packages installed as a dependency for another package
- pacman -Qt searches for missed installed orphans / packages that not required by any other packages
- pacman -Fs
searches for a file in installable packages - pacman -Sc clears uninstalled packages from cache
- pacman -Scc clears all cached packages
- pacman -U file:///var/cache/pacman/pkg/package.zst downgrades a package from cache
Consider using yay as a frontend for pacman. Really convernient + fast. Plus you can manage AUR packages with it as well.
Update 2019: Nah.
I use the following aliases/bash functions in .bashrc:
alias upd='sudo pacman -Syu'
alias ins='sudo pacman -Sy'
alias aursearch='curl -s https://aur.archlinux.org/packages.gz
| zgrep'
aurinst () { pushd /home/psic4t/sys/aur &&
git clone https://aur.archlinux.org/"$1".git &&
cd "$1" && makepkg -si && popd; }