Skip to content

Instantly share code, notes, and snippets.

@zhaidongplus
Last active December 17, 2015 05:49
Show Gist options
  • Save zhaidongplus/5560449 to your computer and use it in GitHub Desktop.
Save zhaidongplus/5560449 to your computer and use it in GitHub Desktop.

Archlinux Cheat Sheet

Pacman

https://www.archlinux.org/pacman/pacman.8.html

https://wiki.archlinux.org/index.php/Pacman

https://wiki.archlinux.org/index.php/Pacman_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

https://wiki.archlinux.org/index.php/Pacman_Tips_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

Updating

Sync/Query: Force an synchronize of all packages.

pacman -Syy

Sync/Query: Synchronize all packages.

pacman -Sy

Searching

Sync/Query: Search for a package to install.

pacman -Ss string1 string2

Local/Query: Search through installed packages.

pacman -Qs string1 string2

Install & Remove

Sync/Query: Install a package.

pacman -S package_name

Remove: Remove an installed package.

pacman -R package_name

Remove: Remove an installed package and it's dependencies.

pacman -Rs package_name

List Packages

Local/Query: List orphan packages (ones no longer required as dependencies).

pacman -Qqdt

Local/Query: List explicitly installed packages.

pacman -Qqet

Information

Sync/Query: Display extensive information on any package.

pacman -Si package_name

Local/Query: Display extensive information on an installed package.

pacman -Qi package_name

Local/Query: List files that were installed by a package.

pacman -Ql package_name

Local/Query: Find what package a file belongs to.

pacman -Qo /path/to/file

Other: Show a dependency tree for a package.

pactree package_name

Other: Show a list of all packages depending on a package.

whoneeds package_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment