Home / Articles / Linux / yum / 7 / yum-configuration

YUM Package Management

  1. Install Package
  2. 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!
  3. Remove Package
  4. # 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!
  5. List a Package
  6. 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
  7. Search a Package
  8. # 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
  9. Get Information of a Package
  10. # 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.
  11. Check what provides a Package
  12. # 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
  13. Check Dependency of a Package
  14. # 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
  15. Update System Packages
  16. 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}
  17. Show yum Install History
  18. # yum history
  19. Clean yum Cache
  20. # yum clean all