Created
April 26, 2019 14:35
-
-
Save tmcolby/a97d03838efe388669f68610bdbc4da3 to your computer and use it in GitHub Desktop.
arch linux pacman commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To update the system | |
sudo pacman -Syu | |
Update the database: | |
sudo pacman -Syy | |
Installing | |
To install a package (always run pacman -Syu, before installing): | |
sudo pacman -S package_name | |
To install a local package, or from a website: | |
sudo pacman -U /path/to/the/package | |
To re-install all packages (those from the repo’s), in case of emergency: | |
sudo pacman -Sy $(pacman -Q | cut -d " " -f1 | grep -v "$(pacman -Qm | cut -d " " -f1)") | |
Removing Packages | |
If you want to only remove the package, the following command is sufficient: | |
sudo pacman -R | |
To remove the package and those of its dependencies that aren’t needed by any other application, do | |
sudo pacman -Rs | |
Finally, to remove the package, avoid orphaned dependencies and erase its global configuration, type | |
sudo pacman -Rns package_name | |
Searches/Queries | |
Info about an installed package: | |
pacman -Qi package_name | |
Queries the repo about a package: | |
pacman -Ss package_name | |
Queries the repo about a packages, and all that depend on it: | |
pacman -Sii package_nam | |
which in most cases is the proper command to remove software. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
often its best to run
pacman -S archlinux-keyring
before doing a system upgrade