rpm command summary - rpm common commands - how to delete the rpm installation source - how to reduce the version after yum installation

=

=

=

rpm command summary

Reference: http://man.linuxde.net/rpm  rpm command

-a: query all kits;
-b <completion stage><package file>+ or -t <completion stage><package file>+: Set the completion stage of the package package, and specify the file name of the package file;
-c: Only the configuration files are listed, this parameter needs to be used with the "-l" parameter;
-d: Only list text files, this parameter needs to be used with the "-l" parameter;
-e<package file> or --erase<package file>: delete the specified package;
-f<file>+: Query the package with the specified file;
-h or --hash: List flags when the suite is installed;
-i: Display information about the kit;
-i <package file> or --install <package file>: install the specified package file;
-l: Display the file list of the suite;
-p<package file>+: Query the specified RPM package file;
-q: Use query mode, when encountering any problems, the rpm command will ask the user first;
-R: Display the association information of the kit;
-s: Display the file status, this parameter needs to be used with the "-l" parameter;
-U<package file> or --upgrade<package file>: upgrade the specified package file;
-v: Display the instruction execution process;
-vv: Display the instruction execution process in detail, which is convenient for troubleshooting.

rpm common commands

rpm -ivh salt-repo-latest-2.el6.noarch.rpm

i:install

v: show the execution process

h: list hash tags

 

rpm -e salt-repo-latest-2.el6.noarch.rpm

e: delete

 

rpm -q zabbix-web

Query installed software

 

rpm -ql zabbix-web | grep example.conf

/usr/share/doc/zabbix-web-3.4.7/httpd22-example.conf

/usr/share/doc/zabbix-web-3.4.7/httpd24-example.conf

Query the files related to the installed software.

You can query the target you are looking for by grep.

 

How to delete the rpm installation source, how to downgrade the yum installation

yum info zabbix-server-mysql #Shows a low version, the default source version

 

rpm -ivh zabbix-release-3.4-1.el6.noarch.rpm #Installed a new source, a higher version of the source

 

(You can rebuild the yum cache: yum makecache)

 

yum info zabbix-server-mysql #Displayed as a higher version

 

yum install zabbix-server-mysql #installation

 

[root@june-test-11 june]# rpm -q zabbix-server-mysql

zabbix-server-mysql-3.4.8-1.el6.x86_64

shows that a higher version is installed

yum info zabbix-server-mysql #Shows that a higher version is installed

 

rpm -q zabbix-release

zabbix-release-3.4-1.el6.noarch

Show the registration of the installed higher version

 

rpm -e zabbix-release

Remove this higher version installed

 

rpm -q zabbix-release

package zabbix-release is not installed

 

yum erase zabbix-server-mysql

successfully deleted

 

yum info zabbix-server-mysql

Test result: Sure enough, only the low version is left, returning to the original state of the system

 

summary:

1. Remove the package

yum erase zabbix-server-mysql

2. Delete the source installed by rpm

rpm -e zabbix-release

Here we must pay attention to use rpm -q to find the deleted name first, otherwise it will report that the deleted package cannot be found.

 

=

=

=

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326109158&siteId=291194637