Home  >  Article  >  php教程  >  How to forcefully delete rpm packages

How to forcefully delete rpm packages

高洛峰
高洛峰Original
2017-01-07 13:56:082121browse

Delete software

It is very simple to delete the software, just execute the following command:

# rpm –e xanim

At this time, the user should pay attention to using the name of the software xanim, not the name of the software package Name xanim-27.64-3.i386.rpm.

If the software to be deleted is required by other software, the user will get an error message similar to the following:

# rpm –e xanim 
error: xanim is needed by mtv-1.0-1

This indicates that if the user deletes xanim, mtv will not be able to run because Some software in xanim is needed for mtv to run.
If the user must delete, you can use the following command:

# rpm –e xanim  --nodeps

Upgrade software

If the user has installed xanim-27063-1.i386.rpm before, and now has xanim -27064-1.i386.rpm, then use the following
command to upgrade this package:

# rpm –Uhv  xanim-27064-1.i386.rpm

In fact, the -U parameter tells RPM to delete the original version first, and then install the new version. . So regardless of whether this software package has been installed before, users
can use the rpm-Uhv command to install the software.

The following editor will teach you a trick

RPM is not only a tool for installing/uninstalling programs, it is also a good tool for system maintenance and diagnosis. After reading the following examples, you will understand how powerful it is.

· What should you do if you delete some files by mistake, but you are not sure which files were deleted? You can type:

rpm -Va

rpm will display the file deletion status on the screen. If you find that some files are missing or damaged, you can reinstall or uninstall

and then install the package.

· If you encounter a file you don’t recognize and want to find out which software package it belongs to, you can enter the following command

rpm -qf /usr/X11R6/bin/xjewel

The output result will be:

xjewel-1.6-1

· If a combination of the above two examples occurs, such as a problem with the file /usr/bin/paste . If you want to know which software package contains the file

, you can simply type:

rpm -Vf /usr/bin/paste

· If you If you want to know more about the program you are using, you can type the following command to get the documentation information about the program in the software package:

rpm -qdf /usr/bin/ispell

Output results For:

/usr/man/man4/ispell.4

/usr/man/man4/english.4

/usr/man/man1/unsq.1

/usr/man/man1/tryaffix.1


/usr/man/man1/sq.1

/usr/man/man1/munchlist.1

/usr/man/man1/ispell.1

/usr/man/man1/findaffix.1

/usr/man/man1/buildhash.1

/ usr/info/ispell.info.gz

/usr/doc/ispell-3.1.18-1/README

· You discovered a new koules RPM but you didn't know about it What it does, you can type the following command:

rpm -qip koules-1.2-2.i386.rpm

· Now you want to know which RPM packages of koules are installed in the system file, you can type:

rpm -qlp koules-1.2-2.i386.rpm The output result is:

/usr/man/man6/koules.6

/usr/lib/games/kouleslib/start.raw

/usr/lib/games/kouleslib/end.raw

/usr/lib/games/kouleslib/destroy2.raw

/usr/lib/games/kouleslib/destroy1.raw

/usr/lib/games/kouleslib/creator2.raw

/usr/lib/games/kouleslib/creator1 .raw

/usr/lib/games/kouleslib/colize.raw

/usr/lib/games/kouleslib

/usr/games/koules


For more related articles on how to forcefully delete rpm packages, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn