Command | Description |
---|---|
rpm -q |
query all installed packages |
rpm -q firefox |
query firefox installed |
rpm -ql firefox |
query list of files in firefox package |
rpm -qid firefox |
query package information including documentation files |
rpm -qf /usr/bin/ab |
which package that owns ab |
rpm -qdf /usr/bin/ab |
list document comes with package that owns ab |
rpm -V package |
verify an installed package |
rpm -Va |
verify all installed package |
rpm -Vf /usr/bin/ab |
verify the package that owns ab |
rpm -qa --qf "%-10{SIZE} %-30{NAME}\n" | sort -n | less |
sort all installed packages by size |
rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" |
:list architecture |
rpm -qpR package |
list package dependencies |
rpm -qp --scripts package |
list package pre and post scripts |
rpm -qa --queryformat '%{SIZE}\n' | awk '{sum += $1} END {printf("Total size in packages = %4.1f GB\n", sum/1024**3)}' |
total size of all rpms installed |
rpm -q --changelog package |
package change log |
rpm -q --provides package |
what the package provides |
rpm -q --qf '[%{obsoletes}\n]' package |
show obsolete tags |
rpm -K package.rpm |
verify package integrity |
|
|
|
|
rpm -qa
: query all installed packagesrpm -q firefox
: query firefox installedrpm -ql firefox
: query list of files in firefox package- rpm -qpl name.rpm query list files in name.rpm
rpm -qid firefox
: query package information including documentation filesrpm -qf /usr/bin/ab
: which package that owns abrpm -qdf /usr/bin/ab
: list document comes with package that owns abrpm -V package
: verify a packagerpm -Va
: verify all installed packagerpm -Vf /usr/bin/ab
: verify the package that owns ab.rpm -qa --qf "%-10{SIZE} %-30{NAME}\n" | sort -n | less
: sort all installed packages by size.rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n"
:list architecturerpm -qpR package
: list package dependencies- rpm --test -e package: list what requires this package
rpm -qp --scripts package
: list package pre and post scripts- rpm -q --changelog package: package change log
- rpm -qa --queryformat '%{SIZE}\n' | awk '{sum += $1} END {printf("Total size in packages = %4.1f GB\n", sum/1024**3)}': total size of all rpms installed
- rpm -q --provides package: what the package provides
- rpm -q --qf '[%{obsoletes}\n]' package: show obsolete tags
- rpm -K package.rpm: verify package integrity
rpm -ivh package.rpm
: installing, verbose and show progress with ###rpm -Uvh package.rpm
: updating a packagerpm -Fvh *.rpm
: updating the packages only if an earlier version is present
rpm -e package
rpm -e --nodeps package
$ rpm --test -ivh package.rpm
Rebuild RPM db (when it is corrupted or yum stuck)
# rm /var/lib/rpm/__db* # rpm --rebuilddb
No comments:
Post a Comment