Home Arch Linux How To Ignore A Package From Being Upgraded In Arch Linux

How To Ignore A Package From Being Upgraded In Arch Linux

By sk
Published: Updated: 89.2K views

Sometimes, you may want to ignore a package from being upgraded in your Arch Linux system. It is true that the outdated packages might be vulnerable and not safe to our system. So, we need to update the Arch Linux 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 certain reasons.

Since Arch Linux is a rolling-release distribution, 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, and it is compatible with all dependencies and applications, we can then upgrade it to the latest available version. This brief tutorial explains how to ignore a package from being upgraded in Arch Linux and its variants such as EndeavourOS and Manjaro Linux.

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

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 while 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.

For multiple packages use a space-separated list, or use additional IgnorePkg lines.

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 simply run:

$ sudo pacman -Syu --ignore=vlc

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

$ sudo pacman -Syu --ignoregroup=plasma-desktop

Hope this helps.

You May Also Like

3 comments

Abdullah Khaled November 17, 2019 - 11:59 pm

i just want to note that you should put these lines or just uncomment them under the [options] section

Reply
Peter Marreck February 8, 2022 - 3:08 am

What about multiple ignores?

Reply
sk February 8, 2022 - 12:42 pm

For multiple packages use a space-separated list, or use additional IgnorePkg lines.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More