English French
~]${nbsp}pass:attributes[{blank}][command]#rpm -qi gpg-pubkey-fd431d51-4ae0493b#
~]${nbsp}pass:attributes[{blank}][command]#rpm -V tree#
~]${nbsp}rpm -qa gpg-pubkey*
~]${nbsp}rpm -q tree
tree-1.7.0-3.{PKGOS}.x86_64
A crucial design goal was to allow the use of *pristine* software sources, as distributed by the original authors of the software. With [application]*RPM*, you have the pristine sources along with any patches that were used, plus complete build instructions. This is an important advantage for several reasons. For instance, if a new version of a program is released, you do not necessarily have to start from scratch to get it to compile. You can look at the patch to see what you *might* need to do. All the compiled-in defaults, and all of the changes that were made to get the software to build properly, are easily visible using this technique.
Additional Resources
Alternatively, [application]*RPM* may save the package's *new* configuration file as, for example, `pass:attributes[{blank}]_configuration_file.conf_.rpmnew` and leave the configuration file you modified untouched. You should still resolve any conflicts between your modified configuration file and the new one, usually by merging changes from the old one to the new one, for example using the [command]#diff# program.
Although you can *force* [command]#rpm# to install a package that has an unresolved dependency (using the [option]`--nodeps` option), this is *not* recommended and will usually result in the installed software failing to run. Installing packages with [option]`--nodeps` can cause applications to misbehave or terminate unexpectedly. It can also cause serious package-management problems or system failure. For these reasons, heed the warnings about missing dependencies. The [application]*DNF* package manager performs automatic dependency resolution and fetches dependencies from on-line repositories.
Although you can *force* [command]#rpm# to uninstall a package that has unresolved dependencies (using the [option]`--nodeps` option), this is *not* recommended. Removing packages with [option]`--nodeps` can cause applications from the packages whose dependencies are removed to misbehave or terminate unexpectedly. It can also cause serious package-management problems or system failure. For these reasons, heed the warnings about failed dependencies.
Always use the -i (install) option to install new kernel packages!
Another powerful [application]*RPM* feature is the ability to verify packages. It allows you to verify that the files installed on the system are the same as the ones supplied by a given package. If an inconsistency is detected, [application]*RPM* notifies you, and you can reinstall the package if necessary. Any configuration files that you modified are preserved during reinstallation.
[application]*GPG* is installed by default, as well as a set of Red{nbsp}Hat keys for verifying packages. To import additional keys for use with [application]*RPM*, see xref:RPM.adoc#s2-keys-importing[Importing GPG Keys].
[application]*RPM* has five basic modes of operationindexterm:[RPM,basic modes] (not counting package building): installing, uninstalling, upgrading, querying, and verifying. This section contains an overview of each mode. For complete details and options, try [command]#rpm --help# or see *rpm*(8). Also, see xref:RPM.adoc#s1-rpm-additional-resources[Additional Resources] for more information on [application]*RPM*.
[application]*RPM* is designed to provide powerful querying options. You can perform searches on your copy of the database for packages or even just certain files. You can also easily find out what package a file belongs to and where the package came from. The files an [application]*RPM* package contains are in a compressed archive, with a custom binary header containing useful information about the package and its contents, allowing you to query individual packages quickly and easily.
[application]*RPM* then automatically upgrades only those packages that are already installed.
Assuming the `tree-1.7.0-3.{PKGOS}.x86_64.rpm` package is in the current directory, log in as `root` and type the following command at a shell prompt to either upgrade or install the [package]*tree* package:
Because [application]*RPM* can make changes to the system itself, performing operations like installing, upgrading, downgrading, and uninstalling binary packages system-wide requires `root` privileges in most cases.
Checking Package Signatures
[command]#rpm -e _package_pass:attributes[{blank}]#
[command]#rpm -Fvh _package.rpm_pass:attributes[{blank}]#