How To: Update From The Terminal In Fedora

It may seem silly to write an article about how to update from the terminal in Fedora, but it’s not! There’s actually a reason for doing this and there’s more to it than just updating! I’ll try to keep the article brief, but we’ll just have to hope for the best.

If you don’t know what Fedora is, it’s a distro primarily sponsored by Red Hat. In 2003, RHL was nixed in favor of RHEL, a paid distro. Fedora is a community maintained distro based on RHEL and even the trademark is owned by Red Hat. 

So, it’s a pretty solid distro with a few versions. There’s a workstation, IoT, and server edition. It’s binary compatible with RHEL and is widely used, with something like 1.2 million users. Support is through the community, which is a distinction between Fedora and RHEL where support is a paid option. Fedora also has some community spins that offer things like different desktop environments.

I should probably note that, since the changes to CentOS’s direction, RHEL is pretty much free for SOHO use. You can download it and use it on your workstation right now. See this link for more information about getting and using RHEL free – it’s a lot nicer an agreement than you may think!

Anyhow, on to Fedora… 

The motivation behind this article is that there’s an ‘undo’ option for DNF that’s pretty neat. However, out of the box it doesn’t do much. There are some extra steps you’re going to want to take and none of the sites that I’ve visited ever seem to put these two together.

This article aims to address that!

Update From The Terminal In Fedora:

Obviously, you’re going to need your terminal open. To do this, you can just use your keyboard and press CTRL + ALT + T. That should open your default terminal.

Once your terminal is open, you can upgrade like so:

That should update your system to the latest and greatest. In fact, you can list your previous DNF history with the following command:

Now, here’s the neat part… When you run the history command above, the first column is an ID column and you can undo a specific update with this command:

Except that pretty much never works. Fedora isn’t in the habit of keeping archived versions in their repositories. So, this is the neat part, you need to add a repo that contains those archives. That’s the missing step!

This isn’t a perfect undo, but it’s a far sight better than it is without that repo being added. For the most part, it works. If it’s not working, it may ask you to use either (or both) the --allow-erasing or --skip-broken flags and, from my testing, that appears to make it work well enough most of the time.

So, if you want to use the undo feature offered by DNF, you should really add that archive. Doing so will make a more robust solution when you attempt to update from the terminal in Fedora.


And there you have it. With that, you should be able to update from the terminal in Fedora with some greater confidence. With that little change, you can actually undo (some/many) updates if they go awry or if you need a little more time before you can use the newer versions of your applications. It’s not that hard and my observations tell me that it works with some regularity – if you’ve added the archive repo.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment

Subscribe to Newsletter!
Get notified when new articles are published!
We promise to never share your email!

Author: KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.