Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1614083
  • 博文数量: 409
  • 博客积分: 6240
  • 博客等级: 准将
  • 技术积分: 4908
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-01 00:04
文章分类

全部博文(409)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(13)

2015年(22)

2013年(4)

2012年(240)

2011年(127)

分类: LINUX

2012-01-09 13:21:41

rpm -e 
rpm -qa
rpm -e software --odeps  //强制卸载!!!
-bash-3.2$ rpm --help
Usage: rpm [OPTION...]
  --quiet

Query options (with -q or --query):
  -c, --configfiles                list all configuration files
  -d, --docfiles                   list all documentation files
  --dump                           dump basic file information
  -l, --list                       list files in package
  --queryformat=QUERYFORMAT        use the following query format
  -s, --state                      display the states of the listed files
  -a, --all                        query/verify all packages
  -f, --file                       query/verify package(s) owning file
  -g, --group                      query/verify package(s) in group
  -p, --package                    query/verify a package file
  -W, --ftswalk                    query/verify package(s) from TOP file tree
                                   walk
  --pkgid                          query/verify package(s) with package
                                   identifier
  --hdrid                          query/verify package(s) with header
                                   identifier
  --fileid                         query/verify package(s) with file identifier
  --specfile                       query a spec file
  --triggeredby                    query the package(s) triggered by the
                                   package
  --whatrequires                   query/verify the package(s) which require a
                                   dependency
  --whatprovides                   query/verify the package(s) which provide a
                                   dependency
  --nomanifest                     do not process non-package files as
                                   manifests

Verify options (with -V or --verify):
  --nomd5                          don't verify MD5 digest of files
  --nofiles                        don't verify files in package
  --nodeps                         don't verify package dependencies
  --noscript                       don't execute verify script(s)
  -a, --all                        query/verify all packages
  -f, --file                       query/verify package(s) owning file
  -g, --group                      query/verify package(s) in group
  -p, --package                    query/verify a package file
  -W, --ftswalk                    query/verify package(s) from TOP file tree
                                   walk
  --pkgid                          query/verify package(s) with package
                                   identifier
  --hdrid                          query/verify package(s) with header
                                   identifier
  --fileid                         query/verify package(s) with file identifier
  --specfile                       query a spec file
  --triggeredby                    query the package(s) triggered by the
                                   package
  --whatrequires                   query/verify the package(s) which require a
                                   dependency
  --whatprovides                   query/verify the package(s) which provide a
                                   dependency
  --nomanifest                     do not process non-package files as
                                   manifests

File tree walk options (with --ftswalk):
  --comfollow                      FTS_COMFOLLOW: follow command line symlinks
  --logical                        FTS_LOGICAL: logical walk
  --nochdir                        FTS_NOCHDIR: don't change directories
  --nostat                         FTS_NOSTAT: don't get stat info
  --physical                       FTS_PHYSICAL: physical walk
  --seedot                         FTS_SEEDOT: return dot and dot-dot
  --xdev                           FTS_XDEV: don't cross devices
  --whiteout                       FTS_WHITEOUT: return whiteout information

Signature options:
  --addsign                        sign package(s) (identical to --resign)
  -K, --checksig                   verify package signature(s)
  --delsign                        delete package signatures
  --import                         import an armored public key
  --resign                         sign package(s) (identical to --addsign)
  --nodigest                       don't verify package digest(s)
  --nosignature                    don't verify package signature(s)

Database options:
  --initdb                         initialize database
  --rebuilddb                      rebuild database inverted lists from
                                   installed package headers

Install/Upgrade/Erase options:
  --aid                            add suggested packages to transaction
  --allfiles                       install all files, even configurations
                                   which might otherwise be skipped
  --allmatches                     remove all packages which match
                                   (normally an error is generated if
                                    specified multiple packages)
  --badreloc                       relocate files in non-relocatable package
  -e, --erase=+           erase (uninstall) package
  --excludedocs                    do not install documentation
  --excludepath=             skip files with leading component  
  --fileconflicts                  detect file conflicts between packages
  --force                          short hand for --replacepkgs --replacefiles
  -F, --freshen=+     upgrade package(s) if already installed
  -h, --hash                       print hash marks as package installs (good
                                   with -v)
  --ignorearch                     don't verify package architecture
  --ignoreos                       don't verify package operating system
  --ignoresize                     don't check disk space before installing
  -i, --install                    install package(s)
  --justdb                         update the database, but do not modify the
                                   filesystem
  --nodeps                         do not verify package dependencies
  --nomd5                          don't verify MD5 digest of files
  --nocontexts                     don't install file security contexts
  --noorder                        do not reorder package installation to
                                   satisfy dependencies
  --nosuggest                      do not suggest missing dependency
                                   resolution(s)
  --noscripts                      do not execute package scriptlet(s)
  --notriggers                     do not execute any scriptlet(s) triggered
                                   by this package
  --oldpackage                     upgrade to an old version of the package
                                   (--force on upgrades does this
                                   automatically)
  --percent                        print percentages as package installs
  --prefix=                   relocate the package to , if
                                   relocatable
  --relocate==           relocate files from path to
  --repackage                      save erased package files by repackaging
  --replacefiles                   ignore file conflicts between packages
  --replacepkgs                    reinstall if the package is already present
  --test                           don't install, but tell if it would work or
                                   not
  -U, --upgrade=+     upgrade package(s)

Common options for all rpm modes and executables:
  -D, --define='MACRO EXPR'        define MACRO with value EXPR
  -E, --eval='EXPR'                print macro expansion of EXPR
  --macros=              read instead of default file(s)
  --nodigest                       don't verify package digest(s)
  --nosignature                    don't verify package signature(s)
  --rcfile=              read instead of default file(s)
  -r, --root=ROOT                  use ROOT as top level directory (default:
                                   "/")
  --querytags                      display known query tags
  --showrc                         display final rpmrc and macro configuration
  --quiet                          provide less detailed output
  -v, --verbose                    provide more detailed output
  --version                        print the version of rpm being used

Options implemented via popt alias/exec:
  --scripts                        list install/erase scriptlets from
                                   package(s)
  --setperms                       set permissions of files in a package
  --setugids                       set user/group ownership of files in a
                                   package
  --conflicts                      list capabilities this package conflicts
                                   with
  --obsoletes                      list other packages removed by installing
                                   this package
  --provides                       list capabilities that this package provides
  --requires                       list capabilities required by package(s)
  --info                           list descriptive information from package(s)
  --changelog                      list change logs for this package
  --xml                            list metadata in xml
  --triggers                       list trigger scriptlets from package(s)
  --last                           list package(s) by install time, most
                                   recent first
  --dupes                          list duplicated packages
  --filesbypkg                     list all files from each package
  --fileclass                      list file names with classes
  --filecolor                      list file names with colors
  --filecontext                    list file names with security context from
                                   header
  --fscontext                      list file names with security context from
                                   file system
  --recontext                      list file names with security context from
                                   policy RE
  --fileprovide                    list file names with provides
  --filerequire                    list file names with requires
  --redhatprovides                 find package name that contains a provided
                                   capability (needs rpmdb-redhat package
                                   installed)
  --redhatrequires                 find package name that contains a required
                                   capability (needs rpmdb-redhat package
                                   installed)
  --buildpolicy=           set buildroot (e.g. compress man
                                   pages)
  --with=
  --without=

Help options:
  -?, --help                       Show this help message
  --usage                          Display brief usage message
-bash-3.2$ 
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
[root@localhost mysql]# netstat -tnlpu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      1925/pure-ftpd (SER 
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1149/sshd           
tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      1338/postgres       
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      1890/php-cgi        
tcp        0      0 :::21                       :::*                        LISTEN      1925/pure-ftpd (SER 
tcp        0      0 :::22                       :::*                        LISTEN      1149/sshd           
tcp        0      0 :::5432                     :::*                        LISTEN      1338/postgres       
udp        0      0 0.0.0.0:51294               0.0.0.0:*                               1049/avahi-daemon:  
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1049/avahi-daemon:  
[root@localhost mysql]#
[root@localhost mysql]# yum remove php
Loaded plugins: fastestmirror, protectbase
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package php.i686 0:5.3.3-3.el6_1.3 will be erased
--> Processing Dependency: php = 5.3.3-3.el6_1.3 for package: php-devel-5.3.3-3.el6_1.3.i686
--> Running transaction check
---> Package php-devel.i686 0:5.3.3-3.el6_1.3 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================
 Package                    Arch                  Version                            Repository              Size
==================================================================================================================
Removing:
 php                        i686                  5.3.3-3.el6_1.3                    @base                  3.3 M
Removing for dependencies:
 php-devel                  i686                  5.3.3-3.el6_1.3                    @base                  3.0 M

Transaction Summary
==================================================================================================================
Remove        2 Package(s)

Installed size: 6.3 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : php-devel-5.3.3-3.el6_1.3.i686                                                                 1/2 
  Erasing    : php-5.3.3-3.el6_1.3.i686                                                                       2/2 

Removed:
  php.i686 0:5.3.3-3.el6_1.3                                                                                      

Dependency Removed:
  php-devel.i686 0:5.3.3-3.el6_1.3                                                                                

Complete!
[root@localhost mysql]#
[root@localhost mysql]# rpm -qa | grep php
php-pdo-5.3.3-3.el6_1.3.i686
php-bcmath-5.3.3-3.el6_1.3.i686
php-common-5.3.3-3.el6_1.3.i686
php-cli-5.3.3-3.el6_1.3.i686
php-pear-1.9.4-4.el6.noarch
php-imap-5.3.3-3.el6_1.3.i686
php-mbstring-5.3.3-3.el6_1.3.i686
[root@localhost ~]# yum remove php*
Loaded plugins: fastestmirror, protectbase
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-cli.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-common.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-imap.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-mbstring.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-pdo.i686 0:5.3.3-3.el6_1.3 will be erased
---> Package php-pear.noarch 1:1.9.4-4.el6 will be erased
--> Processing Dependency: /usr/bin/php for package: LuNamp-2.1-beta1.i386
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package LuNamp.i386 0:2.1-beta1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================
 Package                     Arch                  Version                         Repository                Size
==================================================================================================================
Removing:
 php-bcmath                  i686                  5.3.3-3.el6_1.3                 @base                     27 k
 php-cli                     i686                  5.3.3-3.el6_1.3                 @base                    6.3 M
 php-common                  i686                  5.3.3-3.el6_1.3                 @base                    2.9 M
 php-imap                    i686                  5.3.3-3.el6_1.3                 @base                     89 k
 php-mbstring                i686                  5.3.3-3.el6_1.3                 @base                    1.9 M
 php-pdo                     i686                  5.3.3-3.el6_1.3                 @base                    150 k
 php-pear                    noarch                1:1.9.4-4.el6                   @base                    2.2 M
Removing for dependencies:
 LuNamp                      i386                  2.1-beta1                       installed                481 M

Transaction Summary
==================================================================================================================
Remove        8 Package(s)

Installed size: 494 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : php-imap-5.3.3-3.el6_1.3.i686                                                                  1/8 
  Erasing    : php-bcmath-5.3.3-3.el6_1.3.i686                                                                2/8 
  Erasing    : php-pdo-5.3.3-3.el6_1.3.i686                                                                   3/8 
  Erasing    : php-mbstring-5.3.3-3.el6_1.3.i686                                                              4/8 
  Erasing    : 1:php-pear-1.9.4-4.el6.noarch                                                                  5/8 
  Erasing    : php-cli-5.3.3-3.el6_1.3.i686                                                                   6/8 
  Erasing    : php-common-5.3.3-3.el6_1.3.i686                                                                7/8 
  Erasing    : LuNamp-2.1-beta1.i386                                                                          8/8 
waiting for server to shut down.... done
server stopped

PgSQL 关闭成功!
PgSQL was closed successfully. 

Nginx 关闭成功!
Nginx was closed successfully. 
httpd (no pid file) not running

Apache 关闭成功!
Apache was restarted successfully. 
Shutting down php_fpm . done
named: 没有进程被杀死

Bind 关闭成功!
Bind was restarted successfully. 
memcached: 没有进程被杀死
Non-fatal POSTUN scriptlet failure in rpm package LuNamp

Removed:
  php-bcmath.i686 0:5.3.3-3.el6_1.3    php-cli.i686 0:5.3.3-3.el6_1.3         php-common.i686 0:5.3.3-3.el6_1.3   
  php-imap.i686 0:5.3.3-3.el6_1.3      php-mbstring.i686 0:5.3.3-3.el6_1.3    php-pdo.i686 0:5.3.3-3.el6_1.3      
  php-pear.noarch 1:1.9.4-4.el6       

Dependency Removed:
  LuNamp.i386 0:2.1-beta1                                                                                         

Complete!
[root@localhost ~]# 
[root@localhost ~]# netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      
tcp        0      0 :::22                       :::*                        LISTEN      
[root@localhost ~]# 
[root@localhost mysql]# rpm -qa | grep php
[root@localhost mysql]#
阅读(2447) | 评论(0) | 转发(0) |
0

上一篇:kloxo安装

下一篇:awk 科瓦齿科url统计

给主人留下些什么吧!~~