Download Article
Learn how to install Linux package updates with yum
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
- Open the terminal.
- Check for package updates with yum check-update (optional).
- Type yum update , but don't run it yet.
- Add package names after the update command, or leave it blank to update all packages.
- Press Enter to run the command.
Steps
-
Open the terminal. 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".
-
Check for package updates (optional). 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 -
Run the update command for some or all of your packages. 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] X Research source
- 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.
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] X Research source 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.Thanks
- 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.Thanks
- 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.Thanks
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
References
About This Article
Thanks to all authors for creating a page that has been read 6,948 times.
Advertisement