2014-01-30 04:45:28 +00:00
|
|
|
# pacman
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Arch Linux package manager utility.
|
2023-05-26 10:05:31 +01:00
|
|
|
> See also: `pacman-database`, `pacman-deptest`, `pacman-files`, `pacman-key`, `pacman-mirrors`, `pacman-query`, `pacman-remove`, `pacman-sync`, `pacman-upgrade`.
|
2022-12-05 00:57:55 +00:00
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
2021-01-19 14:40:16 +00:00
|
|
|
> More information: <https://man.archlinux.org/man/pacman.8>.
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Synchronize and update all packages:
|
2015-10-22 08:00:05 +01:00
|
|
|
|
2022-08-10 13:13:57 +01:00
|
|
|
`sudo pacman -Syu`
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2017-11-27 16:35:09 +00:00
|
|
|
- Install a new package:
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`sudo pacman -S {{package}}`
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove a package and its dependencies:
|
2015-10-22 08:00:05 +01:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`sudo pacman -Rs {{package}}`
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2023-06-19 19:16:01 +01:00
|
|
|
- Search the database for packages containing a specific file:
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2023-06-19 19:16:01 +01:00
|
|
|
`pacman -F "{{file_name}}"`
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- List installed packages and versions:
|
2014-01-30 04:45:28 +00:00
|
|
|
|
2022-08-10 13:13:57 +01:00
|
|
|
`pacman -Q`
|
2015-12-29 11:20:11 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- List only the explicitly installed packages and versions:
|
2015-12-29 11:20:11 +00:00
|
|
|
|
2022-08-10 13:13:57 +01:00
|
|
|
`pacman -Qe`
|
2016-01-05 02:19:53 +00:00
|
|
|
|
2021-06-07 21:26:05 +01:00
|
|
|
- List orphan packages (installed as dependencies but not actually required by any package):
|
2016-01-05 02:19:53 +00:00
|
|
|
|
2022-08-10 13:13:57 +01:00
|
|
|
`pacman -Qtdq`
|
2016-01-05 02:19:53 +00: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 04:46:32 +00:00
|
|
|
- Empty the entire `pacman` cache:
|
2016-01-05 02:19:53 +00:00
|
|
|
|
2022-08-10 13:13:57 +01:00
|
|
|
`sudo pacman -Scc`
|