C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Erasing a Package
 

Erasing a Package

The most basic erase command is:
# rpm -e eject
#
        

In this case, the eject package was erased. There isn't much in the way of feedback, is there? Could we get more if we add -v?
# rpm -ev eject
#
        

Still nothing. However, there's another option that can be counted on to give a wealth of information. Let's give it a try:

Getting More Information With -vv

By adding -vv to the command line, we can often get a better feel for what's going on inside RPM. The -vv option was really meant for the RPM developers, and its output may change, but it is a great way to gain insight into RPM's inner workings. Let's try it with rpm -e:
# rpm -evv eject
 (if any)
D: removing database entry
D: removing name index
D: removing group index
D: removing file index for /usr/bin/eject
D: removing file index for /usr/man/man1/eject.1
#
          
Although -v had no effect on RPM's output, -vv gave us a torrent of output. But what does it tell us?

First, RPM displays the package's record number. The number is normally of use only to people that work on RPM's database code.

The "files test = 0 the --test option is used. Refer to the section called --test — Go Through the Process of Erasing the Package, But Do Not Erase It for more information on the use of the --test option with rpm -e.

The next two lines log the actual removal of the files comprising the package. Packages with many files can result in a lot of output when using -vv!

Next, RPM executes a "post-uninstall" script, if one exists. Like the pre-uninstall script, this script is used to perform any processing required to cleanly erase the package. Unlike the pre-uninstall script, however, the post-uninstall script runs after all the package's files have been removed.

Finally, the last five lines show the process RPM uses to remove every trace of the package from its database. From the messages, we can see that the database contains some per-package data, followed by information on every file installed by the package.

Главная