How To Ignore A Package From Being Upgraded In Arch Linux

Ignore A Package From Being Upgraded

You might ask – Why, on the earth, would I ignore a package from being upgraded? The outdated packages might be vulnerable and not safe to our system, right? Yes! We need to update our system regularly to get latest packages and make our system more secure. However, we need to hold a package or group of packages from being upgraded for some reasons. Since Arch Linux is a rolling-distro, some new packages might break the system or some applications might depend on a particular version of a package to work without any problems. That’s why sometimes we need to prevent a package to upgrade to its newer version. Once we are sure that the new package will not cause any issue, compatible with all dependencies and applications, we can then upgrade it to the latest available version.

Warning: Ignoring packages from being upgraded might break the system sometimes. Please be cautious! Don’t do this unless it is necessary.

This brief tutorial addresses how to ignore a package from being upgraded in Arch Linux and its derivatives.

Ignore A Package From Being Upgraded In Arch Linux

To ignore a package from being upgraded, you need to add it to IgnorePkg or members of IgnoreGroup in the pacman.conf file.

Say for example, to ignore vlc from being upgraded wuile updating your Arch Linux you need to do the following.

Edit pacman.conf file:

sudo vi /etc/pacman.conf

Add the line – “IgnorePkg = vlc” as shown below.

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
 #IgnorePkg =
 IgnorePkg = vlc
 #IgnoreGroup =

Save and close the file. To ignore a group of packages, you need to add IgnoreGroup = plasma-desktop, for example.

Whenever you try to update vlc, you will see a warning message like below.

sudo pacman -S vlc

Sample output:

:: vlc is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]

To remove this, simply remove or comment out the line IgnorePkg = vlc by adding a # sign in-front of it.

Now, again run the following command to update Vlc:

sudo pacman -S vlc

Sample output

resolving dependencies...
looking for conflicting packages...

Packages (1) vlc-2.2.4

Total Installed Size: 10.7 MiB
Net Upgrade Size: 2.15 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) upgrading vlc [######################] 100%

As you see in the above output, Vlc has been upgraded to the latest version.

The above method will permanently stop the specified package from being upgraded until you remove it from the ignore list. To do this temporarily, you can run:

sudo pacman -Syu --ignore=vlc

This command will skip vlc package from being updated. Similarly, to skip a package group, just run:

To skip a package group, run:

sudo pacman -Syu --ignoregroup=plasma-desktop

That’s all for now. Hope this helps. If you find this guide useful, please share it on your Social networks and support us.

Cheers!

Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!

You may also like...