tldr/pages/linux/pacman.md

38 lines
908 B
Markdown
Raw Normal View History

2014-01-30 04:45:28 +00:00
# pacman
> Arch Linux package manager utility.
> Some subcommands such as `pacman sync` have their own usage documentation.
> More information: <https://man.archlinux.org/man/pacman.8>.
2014-01-30 04:45:28 +00:00
- Synchronize and update all packages:
`sudo pacman --sync --refresh --sysupgrade`
2014-01-30 04:45:28 +00:00
- Install a new package:
2014-01-30 04:45:28 +00:00
`sudo pacman --sync {{package_name}}`
2014-01-30 04:45:28 +00:00
- Remove a package and its dependencies:
`sudo pacman --remove --recursive {{package_name}}`
2014-01-30 04:45:28 +00:00
2016-12-29 19:24:05 +00:00
- Search the package database for a regular expression or keyword:
2014-01-30 04:45:28 +00:00
`pacman --sync --search "{{search_pattern}}"`
2014-01-30 04:45:28 +00:00
- List installed packages and versions:
2014-01-30 04:45:28 +00:00
`pacman --query`
- List only the explicitly installed packages and versions:
`pacman --query --explicit`
2016-01-05 02:19:53 +00:00
- List orphan packages (installed as dependencies but not actually required by any package):
2016-01-05 02:19:53 +00:00
`pacman --query --unrequired --deps --quiet`
2016-01-05 02:19:53 +00:00
- Empty the entire pacman cache:
2016-01-05 02:19:53 +00:00
`sudo pacman --sync --clean --clean`