pacman upgrade packages in ArchLinux
pacman upgrade packages in ArchLinux
sudo pacman -Syu
-S – Synchronizes packages
-y – Refreshes the package database
-u – Upgrades all installed packages
Remove a package (keep dependencies)
sudo pacman -R package_name
Remove a package and unneeded dependencies
sudo pacman -Rns package_name
Remove orphaned packages (unneeded dependencies)
sudo pacman -Rns $(pacman -Qdtq)
Remove a package and ignore dependencies
sudo pacman -Rdd package_name
Remove a package and its cache (free up disk space)
sudo pacman -R package_name && sudo pacman -Sc
For a more aggressive cleanup, remove all cached package files:
sudo pacman -R package_name && sudo pacman -Scc
To install packages from a previously saved list of packages, while not reinstalling previously installed packages that are already up-to-date, run:
pacman -S --needed - < pkglist.txt