click below
click below
Normal Size Small Size show me how
LPI101 - 4.6
Use Red Hat Package Manager (RPM)
Question | Answer |
---|---|
rpm -i | The install mode (rpm -i) is used to install new packages. |
rpm -U | A variant of install mode is the upgrade mode (rpm -U), where an installed package is upgraded to a more recent version. |
rpm -e | This mode is used to remove installed packages from the system. By default, rpm uninstalls a package only if no other packages are dependent on it. |
rpm -q | Installed packages and raw package files can be queried using the rpm -q command. Query-mode options exist for package and information selection. |
rpm -V | Files from installed packages can be compared against their expected configuration from the RPM database by using rpm -V. |
rpm -i --force | Allows the replacement of existing packages and of files from previously installed packages; for upgrades, it allows the replacement of a newer package with an older one. |
rpm -ih | Prints a string of 50 hash marks (#) during installation as a progress indicator. |
rpm -i --nodeps | Allows you to install a package without checking for dependencies. This command should be avoided, since it makes the dependency database inconsistent. |
rpm -i --test | Runs through all the motions except for actually writing files; it's useful to verify that a package will install correctly prior to making the attempt. Note that verbose and hash options cannot be used with --test, but -vv can. |
rpm -iv | Sets verbose mode. (Package names are displayed as the packages are being installed.) |
rpm -ivv | Sets really verbose mode. The manpage describes this as "print lots of ugly debugging information." |
rpm -e --nodeps | rpm skips dependency checking with this option enabled. This command should be avoided, since it makes the dependency database inconsistent. |
rpm -e --test | This option runs through all the motions except for actually uninstalling things; it's useful to verify that a package can be uninstalled correctly without breaking other dependencies prior to making the attempt. Note that verbose and hash options cannot |
rpm -qa | Display a list of all packages installed on the system. This is particularly useful when piped to grep if you're not sure of the name of a package or when you want to look for packages that share a common attribute. |
rpm -qf | Display the package that contains a particular file. |
rpm -qp | Query a package file. Most useful with -i, described next. |
rpm -qc | List only configuration files. |
rpm -qd | List only documentation files. |
rpm -qi | Display information about an installed package, or when combined with -p, about a package file. In the latter case, package is a filename. |
rpm -ql | List all of the files contained in package. When used with -p, the package is a filename. |
rpm -qR | List packages on which this package depends. |
rpm -Va | To verify ALL installed packages |
rpm -Vf | To verify a package containing a particular file |
rpm -Vp | To verify an installed package against an RPM package file |
rpm -V --nofiles | Ignores missing files. |
rpm -V --nomd5 | Ignores MD5 checksum errors. |
rpm -V --nopgp | Ignores PGP checking errors. |