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
200 characters left
Include your email address to get a message when this question is answered.
Submit
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

You Might Also Like

Install Software in Red Hat LinuxInstall Software in Red Hat Linux
Install Software on Linux Install Software on Linux: Packages, Compiling, & More
Install or Remove an RPM PackageInstall or Remove an RPM Package
Yum UninstallYum Uninstall Guide: Remove Packages and Dependencies
Update Pip Upgrade Pip: Quick Guide for Beginners & Experts
Install Java on LinuxInstall Java on Linux
Update Java Update or Download Java on PC, Mac, or Linux
Update R Update R in RStudio or Manually: Step-by-Step Guide
Update an Android Update an Android Device to the Latest Version
Update RlangThe Complete Guide to Updating Rlang + Troubleshooting Solutions
Install Software in Debian LinuxInstall Software in Debian Linux
Run a Program from the Command Line on LinuxRun a Program from the Command Line on Linux
Sudo Command Not Found2 Ways to Fix the "Sudo Command Not Found" Error on Linux
Change the Root Password in Linux Change Your Root Linux Password (Even If You Don't Know It)
Advertisement

About This Article

Stan Kats
Reviewed by:
Professional Technologist
This article was reviewed by Stan Kats and by wikiHow staff writer, Hannah Dillon. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 11,455 times.
How helpful is this?
Co-authors: 4
Updated: June 16, 2024
Views: 11,455
Categories: Linux
Thanks to all authors for creating a page that has been read 11,455 times.

Is this article up to date?

Advertisement