2025-03-14 21:59:59 -06:00
|
|
|
# rpm
|
|
|
|
|
|
|
|
|
|
> RPM Package Manager.
|
|
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://rpm-software-management.github.io/rpm/man/rpm.8>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show version of httpd package:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-q|--query]}} httpd`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List versions of all matching packages:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-qa|--query --all]}} '{{mariadb*}}'`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Forcibly install a package regardless of currently installed versions:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-U|--upgrade]}} {{path/to/package.rpm}} --force`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Identify owner of a file and show version of the package:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-qf|--query --file]}} {{/etc/postfix/main.cf}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List package-owned files:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-ql|--query --list]}} {{kernel}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show scriptlets from an RPM file:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-qp|--query --package]}} --scripts {{package.rpm}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show changed, missing and/or incorrectly installed files of matching packages:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-Va|--verify --all]}} '{{php-*}}'`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the changelog of a specific package:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`rpm {{[-q|--query]}} --changelog {{package}}`
|