YUM Package Management
- Install Package
- Remove Package
- List a Package
- Search a Package
- Get Information of a Package
- Check what provides a Package
- Check Dependency of a Package
- Update System Packages
- Show yum Install History
- Clean yum Cache
To Install Package from yum repository
# yum install {package-name}
To Install a package from your local server
# yum localinstall {package-name}
To Reinstall a Package
# yum reinstall vsftpd
Example:
# yum install vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
localrepo | 2.9 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-25.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
vsftpd x86_64 3.0.2-25.el7 localrepo 171 k
Transaction Summary
======================================================================================================================
Install 1 Package
Total download size: 171 k
Installed size: 353 k
Is this ok [y/d/N]: y
Downloading packages:
vsftpd-3.0.2-25.el7.x86_64.rpm | 171 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : vsftpd-3.0.2-25.el7.x86_64 1/1
Verifying : vsftpd-3.0.2-25.el7.x86_64 1/1
Installed:
vsftpd.x86_64 0:3.0.2-25.el7
Complete!
# yum remove {package-name}
# yum erase {package-name}
Example:
# yum remove vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-25.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Removing:
vsftpd x86_64 3.0.2-25.el7 @localrepo 353 k
Transaction Summary
======================================================================================================================
Remove 1 Package
Installed size: 353 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : vsftpd-3.0.2-25.el7.x86_64 1/1
Verifying : vsftpd-3.0.2-25.el7.x86_64 1/1
Removed:
vsftpd.x86_64 0:3.0.2-25.el7
Complete!
To List All Packages
# yum list | less
To List Installed Packages
# yum list installed | less
# yum list installed {package-name}
To List Available Packages for Install
# yum list available
To find Duplicate Packages
# yum --showduplicates list {package-name}
Example:
# yum list vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
vsftpd.x86_64 3.0.2-25.el7
# yum search {package-name}
Example:
# yum search vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
================================================ N/S matched: vsftpd =================================================
vsftpd.x86_64 : Very Secure Ftp Daemon
# yum info {package-name}
Example:
# yum info vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
Name : vsftpd
Arch : x86_64
Version : 3.0.2
Release : 25.el7
Size : 353 k
Repo : installed
From repo : localrepo
Summary : Very Secure Ftp Daemon
URL : https://security.appspot.com/vsftpd.html
License : GPLv2 with exceptions
Description : vsftpd is a Very Secure FTP daemon. It was written completely from
: scratch.
# yum provides {package-name}
Example:
# yum provides vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
vsftpd-3.0.2-25.el7.x86_64 : Very Secure Ftp Daemon
Repo : localrepo
vsftpd-3.0.2-25.el7.x86_64 : Very Secure Ftp Daemon
Repo : @localrepo
# yum deplist {package-name}
Example:
# yum deplist vsftpd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
package: vsftpd.x86_64 3.0.2-25.el7
dependency: /bin/bash
provider: bash.x86_64 4.2.46-31.el7
dependency: /bin/sh
provider: bash.x86_64 4.2.46-31.el7
dependency: libc.so.6(GLIBC_2.15)(64bit)
provider: glibc.x86_64 2.17-260.el7
dependency: libcap.so.2()(64bit)
provider: libcap.x86_64 2.22-9.el7
dependency: libcrypto.so.10()(64bit)
provider: openssl-libs.x86_64 1:1.0.2k-16.el7
dependency: libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)
provider: openssl-libs.x86_64 1:1.0.2k-16.el7
dependency: libcrypto.so.10(libcrypto.so.10)(64bit)
provider: openssl-libs.x86_64 1:1.0.2k-16.el7
dependency: libdl.so.2()(64bit)
provider: glibc.x86_64 2.17-260.el7
dependency: libnsl.so.1()(64bit)
provider: glibc.x86_64 2.17-260.el7
dependency: libpam.so.0()(64bit)
provider: pam.x86_64 1.1.8-22.el7
dependency: libpam.so.0(LIBPAM_1.0)(64bit)
provider: pam.x86_64 1.1.8-22.el7
dependency: libssl.so.10()(64bit)
provider: openssl-libs.x86_64 1:1.0.2k-16.el7
dependency: libssl.so.10(libssl.so.10)(64bit)
provider: openssl-libs.x86_64 1:1.0.2k-16.el7
dependency: libwrap.so.0()(64bit)
provider: tcp_wrappers-libs.x86_64 7.6-77.el7
dependency: logrotate
provider: logrotate.x86_64 3.8.6-17.el7
dependency: rtld(GNU_HASH)
provider: glibc.x86_64 2.17-260.el7
provider: glibc.i686 2.17-260.el7
To Check for Updates available for Install
# yum check-update
To Update the system with all available Packages
# yum update
To Update only a specific Package
# yum update {package-name}
# yum history
# yum clean all