centos how to check for dependency and uninstall package
I am running centos 5.
1) How do I use rpm command to list the package installed and its dependency. 2) How do I use rpm command to uninstall package and its dependency? thnx. |
This command will list any package that has "fox" in it's name...
Code:
rpm -qa | grep fox Code:
rpm -q -R firefox Code:
rpm -e firefox Code:
rpm -e firefox thunderbird Now, having answered the questions, is there a reason you need / want to use rpm rather than yum? yum is a package manager that uses rpm. yum is also better at handling dependencies than rpm. The commands above would be similar in yum... Code:
yum list | grep fox Code:
yum deplist firefox Code:
yum remove firefox Code:
yum install gimp |
I have package A, B and C. Package A needs B and B needs C.
I want to uninstall package A. If do: Code:
rpm -e packA Code:
rpm -e packA, packB Code:
rpm -e packA,..,packZ Or any simpler way to remove or at least list this type of package dependency? |
Have you tried yum remove? It should be able to do this for you
|
Quote:
Unfortunately, you'll have to track down and remove any packages A depends on. |
You can use YUM for install and uninstall packages
Task: Display list of updated software (security fix) Quote:
Task: List all installed packages List all installed packages, enter: # rpm -qa # yum list installed Task: Check for and update specified packages # yum update {package-name-1} Task: Search for packages by name Search httpd and all matching perl packages, enter: # yum list {package-name} # yum list {regex} # yum list httpd # yum list perl* Task: Install the specified packages [ RPM(s) ] Install package called httpd: # yum install {package-name-1} {package-name-2} # yum install httpd Task: Remove / Uninstall the specified packages [ RPM(s) ] Remove package called httpd, enter: # yum remove {package-name-1} {package-name-2} # yum remove httpd Task: Update all the default packages by group Update all 'Development Tools' group packages, enter: # yum groupupdate "Development Tools" Code:
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ |
Please don't bring up old posts (3 yrs old).
|
All times are GMT -5. The time now is 11:34 AM. |