PDF download Download Article
Learn how to install Linux package updates with yum
PDF download Download Article

If you're on one of the Linux distributions based on Red Hat, such as Fedora, CentOS, Rocky Linux, or RHEL, you may be wondering how you can use yum to update your packages. Thankfully, updating your packages with yum is simple: just run the yum update command. You can also use yum to update only the packages that have pending updates—keep reading to learn how.

Quick Steps

  1. Open the terminal.
  2. Check for package updates with yum check-update (optional).
  3. Type yum update , but don't run it yet.
  4. Add package names after the update command, or leave it blank to update all packages.
  5. Press Enter to run the command.
  1. You can do this by pressing Ctrl+Alt+T on your keyboard. Alternatively, you can press the super user (Windows) key on your keyboard to open the Activities menu and search for "terminal".
  2. If you prefer, you can check for any available package updates with the "check-update" subcommand. If you already know what packages you need to update or you just want to update them all, you can skip this step.
    • In the terminal, write yum check-update and press Enter .
    • All of the packages that yum can update will be listed.
    Advertisement
  3. To do this, type yum update . Without any package names with it, the yum update command will try to update every package you have. [1]
    • To specify a package (like the ones found in Step 3 with "check-update"), type its name after the yum update command.
    • Once the packages are done updating, you can close out of the terminal.
  4. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Video

      Tips

      • In RHEL 8 and RHEL 9, software management is based on dnf . [2] However, yum commands have been maintained (as a dnf symlink in RHEL 8 and a dnf alias in RHEL 9) to ensure compatibility with RHEL 7.
      • If you are restricted from using the yum command, put the sudo command before it (i.e. sudo yum update ). Just note that when you use sudo , you'll have to verify the super user (admin) password for verification.
      • You can also use yum upgrade instead of yum update . The yum upgrade command will update your packages and delete obsolete ones. As such, yum update is the safer update option, so you don't lose the packages you're currently using.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 6,948 times.

      Is this article up to date?

      Advertisement