20 Linux YUM Commands for Package Management

YUM (Yellowdog Updater Modified) is an open source command-line as well as graphical based package management tool for RPM (RedHat Package Manager) based Linux systems. It allows users and system administrator to easily install, update, remove or search software packages on a systems

  1. Install a Package with YUM

    # Install a package called Firefox automatically and install all required dependencies for Firefox
    yum install firefox
    yum -y install firefox
  2. Removing a Package with YUM

    # Remove a package completely with their all dependencies
    yum remove firefox
    yum -y remove firefox
  3. Updating a Package using YUM

    # Update it to the latest stable version
    yum update mysql
  4. List a Package using YUM

    # Use the list function to search for the specific package with name
    yum list openssh
  5. Search for a Package using YUM

    # Use search function to search all the available packages to match the name of the package you specified
    yum search vsftpd
  6. Get Information of a Package using YUM

    # Get information of a package before installing it
    yum info firefox
  7. List all Available Packages using YUM

    # List all the available packages in the Yum database
    yum list | less
  8. List all Installed Packages using YUM

    # List all the installed packages on a system
    yum list installed | less
  9. Yum Provides Function

    # Yum provides function is used to find which package a specific file belongs to
    yum provides /etc/httpd/conf/httpd.conf
  10. Check for Available Updates using Yum

    # Find how many of installed packages on your system have updates available
    yum check-update
  11. Update System using Yum

    # Keep your system up-to-date with all security and binary package updates
    yum update
  12. List all available Group Packages

    # Install particular group that will install all the related packages that belongs to the group
    # List all the available groups
    yum grouplist
  13. Install a Group Packages

    # Install a particular package group
    yum groupinstall 'MySQL Database'
  14. Update a Group Packages

    # Update any existing installed group packages
    yum groupupdate 'DNS Name Server'
  15. Remove a Group Packages

    # Delete or remove any existing installed group from the system
    yum groupremove 'DNS Name Server'
  16. List Enabled Yum Repositories

    # List all enabled Yum repositories in your system
    yum repolist
  17. List all Enabled and Disabled Yum Repositories

    # Display all enabled and disabled yum repositories on the system
    yum repolist all
  18. Install a Package from Specific Repository

    # Install a particular package from a specific enabled or disabled repository
    # Use --enablerepo option in your yum command
    yum --enablerepo=epel install phpmyadmin
  19. Interactive Yum Shell

    # Yum utility provides a custom shell where you can execute multiple commands
    yum shell
  20. Clean Yum Cache

    # By default yum keeps all the repository enabled package data in /var/cache/yum/ with each sub-directory
    # Clean all cached files from enabled repository
    yum clean all
  21. View History of Yum

    # View all the past transactions of yum command
    yum history


Popular posts from this blog