1. Home
  2. Linux
  3. Disable app updates on arch

How to disable app updates on Arch Linux

Arch Linux is a “bleeding edge” Linux operating system. Bleeding edge is a slang term in the Linux community that means “new things as fast as possible.” This update philosophy is core to Arch, and one of the reasons that many advanced Linux hobbyists love using it.

There’s a huge benefit to using a bleeding edge system like Arch. For starters, you’ll always get the latest programs, drivers, and enhancements that the Linux community has to offer. However, some severe downsides come with using an operating system like this. The main one is that because updates come as fast as possible, they aren’t tested extensively. Due to the lack of testing, there are bugs, which can occur. To be clear: issues don’t always happen, but because of Arch’s fast updates, breakages frequently occur.

The best way to mitigate package breakages is to disable app updates on Arch Linux, thereby avoiding the broken update. In this guide, we’ll show you how to configure your Arch PC to avoid upgrades of packages.

Find package in Pacman

Before tinkering around with the Pacman configuration files to prevent Arch from upgrading a package on your system, you must find the exact name of the package. The best way to do this is by making use of the “Qe” command-line switch.

To search, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, as a regular user, run Pacman with the “Qe” command-line switch. This operation will print out a complete list of every installed package on the system.

pacman -Qe

Running a query of every installed package on Arch Linux will no-doubt show you a lot of information. For most, this vast amount of data may not be helpful. For this reason, it’s a good idea to make use of the grep command, to sort through and find keywords and patterns.

To sort through your list of installed packages, try:

pacman -Qe | grep 'name of a program or package'

Alternatively, pipe the output to a convenient text file for later with the command below.

pacman -Qe > ~/package-info.txt

Note: to view the package-info.txt file in the terminal, run cat ~/package-info.txt

After doing your search with the grep tool, you’ll see the package name followed by a version number. Ignore the version number and take note of the package name, as you’ll need this when editing configuration files.

Editing Pacman.conf

The way to prevent Arch Linux from upgrading installed packages is by editing the /etc/pacman.conf file and taking advantage of the “IgnorePkg” feature. To get to this feature, launch a terminal window and open up the Pacman.conf file inside of the Nano text editor with root privileges.

su -
nano -w /etc/pacman.conf

Or:

sudo nano -w /etc/pacman.conf

In the Nano text editor, use the Down Arrow and make your way down to the part of the file that says “# Pacman won’t upgrade packages listed in IgnorePkg and members of IgnoreGroup.’

Once there, remove the # symbol from in front of “IgnorePkg.” Then, write in the name of the package from the search earlier after the “=.” It should look like:

IgnorePkg =nameofpackage

Have more than one package you want to prevent Arch Linux from updating? Write out the names of each package after “IgnorePkg,” followed by commas. For example:

IgnorePkg =nameofpackage1, nameofpackage2, nameofpackage3

With all of the packages you’d like to prevent Arch Linux from upgrading set inside of “IgnorePkg,” it’s time to save the changes. Press Ctrl + O on the keyboard to write the edits to the Pacman config file, and close it by pressing Ctrl + X.

Assuming all edits to the Pacman configuration file are done correctly, you’ll be able to run the upgrade command on Arch Linux and successfully prevent the packages in IgnorePkg from upgrading.

sudo pacman -Syyu

Enabling updates

After a few weeks of ignoring an update, it may be safe to upgrade again. To re-enable upgrades for packages that you previously disabled, you’ll need to do the following.

Step 1: open up a terminal window and use Root or Sudo to gain access to the Pacman configuration file.

su -
nano -w /etc/pacman.conf

Or

sudo nano -w /etc/pacman.conf

Step 2: Scroll through the configuration file and make your way down to the “IgnorePkg” area of the file.

Step 3: Using the Backspace key, remove all of the package names after “IgnorePkg.”

Step 4: Save the edits made to the Pacman configuration file in the Nano text editor by pressing the Ctrl + O keyboard combination. Then, close the editor by pressing Ctrl + X.

Step 5: Run the Pacman upgrade command. As it runs, Arch Linux will notice the previously held-back packages are no longer held back and automatically upgrade them to the newest version.

sudo pacman -Syyu