2021-02-25 19:21:26 -03:00
# pacman --sync
> Arch Linux package manager utility.
2023-05-14 17:11:37 +05:30
> See also: `pacman`.
2024-09-24 21:47:18 +02:00
> More information: <https://manned.org/pacman.8>.
2021-02-25 19:21:26 -03:00
- Install a new package:
2024-11-11 22:03:04 +08:00
`sudo pacman -S {{package}}`
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
- [S]ynchronize and refresh ([y]) the package database along with a sys[u]pgrade (add `--downloadonly` to only download the packages and not update them):
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
`sudo pacman -Syu`
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
- Update and [u]pgrade all packages and install a new one without prompting:
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
`sudo pacman -Syu --noconfirm {{package}}`
2021-02-25 19:21:26 -03:00
2025-02-19 16:43:47 +01:00
- [s]earch the package database for a regular expression or keyword:
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
`pacman -Ss "{{search_pattern}}"`
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
- Display [i]nformation about a package:
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
`pacman -Si {{package}}`
2021-02-25 19:21:26 -03:00
- Overwrite conflicting files during a package update:
2024-11-11 22:03:04 +08:00
`sudo pacman -Syu --overwrite {{path/to/file}}`
2021-02-25 19:21:26 -03:00
2024-11-19 12:41:55 +01:00
- Remove not installed packages and unused repositories from the cache (use the flags `Sc` to [c]lean all packages):
2021-02-25 19:21:26 -03:00
2024-11-11 22:03:04 +08:00
`sudo pacman -Sc`
2025-02-09 22:50:22 +02:00
2025-02-19 16:43:47 +01:00
- Specify the package version that should be installed:
2025-02-09 22:50:22 +02:00
`sudo pacman -S {{package}}={{version}}`