1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/pacman-sync.md

38 lines
996 B
Markdown
Raw Normal View History

2021-02-25 19:21:26 -03:00
# pacman --sync
> Arch Linux package manager utility.
> See also: `pacman`.
> More information: <https://manned.org/pacman.8>.
2021-02-25 19:21:26 -03:00
- Install a new package:
`sudo pacman -S {{package}}`
2021-02-25 19:21:26 -03: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
`sudo pacman -Syu`
2021-02-25 19:21:26 -03:00
- Update and [u]pgrade all packages and install a new one without prompting:
2021-02-25 19:21:26 -03:00
`sudo pacman -Syu --noconfirm {{package}}`
2021-02-25 19:21:26 -03:00
- [s]earch the package database for a regular expression or keyword:
2021-02-25 19:21:26 -03:00
`pacman -Ss "{{search_pattern}}"`
2021-02-25 19:21:26 -03:00
- Display [i]nformation about a package:
2021-02-25 19:21:26 -03:00
`pacman -Si {{package}}`
2021-02-25 19:21:26 -03:00
- Overwrite conflicting files during a package update:
`sudo pacman -Syu --overwrite {{path/to/file}}`
2021-02-25 19:21:26 -03: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
`sudo pacman -Sc`
- Specify the package version that should be installed:
`sudo pacman -S {{package}}={{version}}`