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:

sudo dnf upgrade

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

sudo dnf history

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:

sudo dnf history <ID>

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!

sudo dnf install fedora-repos-archive

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.

Closure:

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

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.

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

7 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

7 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

7 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

7 months ago

Get System Information With The ‘uname’ Command In Linux

Today we'll be learning about a basic Linux command that's known as 'uname' and it…

7 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

7 months ago