2014-01-29 21:45:28 -07:00
|
|
|
# pacman
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Arch Linux package manager utility.
|
2024-10-11 23:19:34 +03:00
|
|
|
> See also: `pacman-sync`, `pacman-remove`, `pacman-query`, `pacman-upgrade`, `pacman-files`, `pacman-database`, `pacman-deptest`, `pacman-key`, `pacman-mirrors`.
|
2022-12-05 08:57:55 +08:00
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
2024-09-24 21:47:18 +02:00
|
|
|
> More information: <https://manned.org/pacman.8>.
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- [S]ynchronize and update all packages:
|
2015-10-22 15:00:05 +08:00
|
|
|
|
2022-08-10 14:13:57 +02:00
|
|
|
`sudo pacman -Syu`
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2017-11-27 22:05:09 +05:30
|
|
|
- Install a new package:
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`sudo pacman -S {{package}}`
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- [R]emove a package and its dependencies:
|
2015-10-22 15:00:05 +08:00
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`sudo pacman -Rs {{package}}`
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- Search ([s]) the package database for a regular expression or keyword:
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
`pacman -Ss "{{search_pattern}}"`
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- Search the database for packages containing a specific [F]ile:
|
2014-01-29 21:45:28 -07:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
`pacman -F "{{file_name}}"`
|
2015-12-29 12:20:11 +01:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- List only the [e]xplicitly installed packages and versions:
|
2015-12-29 12:20:11 +01:00
|
|
|
|
2022-08-10 14:13:57 +02:00
|
|
|
`pacman -Qe`
|
2016-01-05 10:19:53 +08:00
|
|
|
|
2024-12-28 15:49:46 +02:00
|
|
|
- List orphan packages (installed as [d]ependencies but not actually required by any package):
|
2016-01-05 10:19:53 +08:00
|
|
|
|
2022-08-10 14:13:57 +02:00
|
|
|
`pacman -Qtdq`
|
2016-01-05 10:19:53 +08:00
|
|
|
|
pages*: fix brand and technical names (#12145)
* pages*: fix Python, Java, pacman, apt, *zip*, xz, tar, git, RPM and grep names
* pages*: fix brand and technical names
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
* fluxctl, gitmoji, in-toto-run, osv-scanner: replace `git` with Git
* bzegrep: enclose egrep with backticks
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* git-bug: use Git instead of `git`
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* git-bug: use Git instead of `git`
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* git-force-clone: use Git instead of `git`
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* gitwatch: use Git instead of `git`
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* hub-init: use Git instead of `git`
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* pages.*: use Linux instead of GNU/Linux
---------
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-01-30 01:46:32 -03:00
|
|
|
- Empty the entire `pacman` cache:
|
2016-01-05 10:19:53 +08:00
|
|
|
|
2022-08-10 14:13:57 +02:00
|
|
|
`sudo pacman -Scc`
|