How to prevent software from being updated in Fedora

Learn how to make a program freeze in one version, and be ignored by the system during updates to Fedora.


At first, for some, it may seem a little pointless. Why would anyone want software not to be updated? But the truth is that causing a program to be ignored during system updates can be quite useful in specific situations for many people.

Often a particular user needs to continue using functionality that is about to be removed in future versions of a particular program, or perhaps the latest version of that software is experiencing a bug or incompatibility issue. In such cases, a at least temporary solution would be to install the previous version of the software, which still works very well, and without the problems allegedly presented in the new version.

However, in some cases when updating the system, these packages of old versions end up being updated, which ends up being inconvenient in these situations. To avoid such behavior, we can cause one or more packages to be ignored when updating the system, and this is the procedure we will learn to do now.

The procedure

First, we will update the system causing one, or several packages to be deleted only during that single update, the procedure must be performed by the terminal using the command below.

sudo dnf update –exclude =

Remembering to replace by the name of the package you want to be ignored. If the target is multiple packages, just write the names of all packages separated by one, (comma), and without spaces.

Now we are going to make a package permanently excluded from the list of updates. For that, we will have to edit a text file located in a directory that has modification permissions granted only to the root user, so we will need to access that file with a text editor open in superuser mode.

This procedure can be done via the graphical interface using a traditional text editor, such as GNOME's Gedit, but for this it will be necessary for you to know what name of the text editor you are using, and which command to call it. If your text editor is Gedit, all you need to do is open the terminal and run the command below to run it as root.

Replacing gedit with the start command of your text editor, if different.

For those who don't know their text editor, or the command to use it, they can use a terminal text editor called Nano, which comes pre-installed on many Linux distributions, and does not depend on the graphical interface. Even so, if nano is not installed on your Fedora, installing it is as simple as copying and pasting the command below.

Finally, all we have to do is open the terminal and run:

sudo nano /etc/dnf/dnf.conf

In the screen that appeared, as shown in the image below, add a line with the content exclude = (replacing by the name of the package you want to ignore during updates).

editor-nano- / etc / dnf / dnf.conf-open

Now simply press Ctrl + O followed by "Enter"to save the changes, and then press Ctrl + X to close the editor Nano.

Once this is done, the chosen software will no longer be updated with the rest of the system. To reverse the process just delete the line exclude = dnf.conf file located in / etc / dnf /.

It is important to make it clear that a procedure like this should be done only in cases of real need, and with software that is not related to the security or operation of the system. For example, it is likely that you will not have any major problems when using an outdated music player, but the situation is quite different when it comes to a kernel.

The idea behind this article is that you know you have this option of functionality, but it should be used responsibly. In case of doubts, before performing the procedure access our frum, open a topic and ask for help from other users about your specific case. We do not advise you to leave keeping outdated packages askew and straight, so if you do, do so at your own risk! Do you like Linux and technology? Do you have any questions or problems that you cannot solve? Come and be part of our community in the forum Diolinux Plus!

This is all personal!

Have you seen any errors or would you like to add any suggestions to this article? Collaborate, click here.