Friday, April 16, 2010

How To Install/Remove/List Packages By YUM

Task: List all installed packages
List all installed packages, enter:
# yum list installed
Find out if httpd package installed or not, enter:
# yum list installed httpd
Task: Check for and update specified packages
# yum update {package-name}
To check for and update httpd package, enter:
# yum update httpd
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}
# yum install httpd
Task: Remove / Uninstall the specified packages [ RPM(s)]
Remove package called httpd, enter:
# yum remove httpd
Task: Display the list of available packages
# yum list all
Task: Display list of group software
Type the following command:
# yum grouplist

Task: Install all the default packages by group
Install all 'Development Tools' group packages, enter:
# yum groupinstall "Development Tools"

Task: Update all the default packages by group
Update all 'Development Tools' group packages, enter:

# yum groupupdate "Development Tools"

Task: Remove all packages in a group
Remove all 'Development Tools' group packages, enter:

# yum groupremove "Development Tools"
Task: Install particular architecture package
If you are using 64 bit RHEL version it is possible to install 32 packages:

# yum install {package-name}.{architecture}

Task: Display what package provides the file
You can easily find out what RPM package provides the file. For example find out what provides the /etc/passwd file:
# yum whatprovides /etc/passwd
You can use same command to list packages that satisfy dependencies:
# yum whatprovides {dependency-1} {dependency-2}

No comments:

Post a Comment