Keep system updated with everything "but"

Hi there,

I keep my system very up to date by running “yay” nearly every day.

Today a very fresh kernel 5.17 is out. So my question is, whenever “yay” gives me a package I do NOT want to update from that list?

I can of course either install ALL updates with a simple “yay” or update single packages, but how do I e. g. update everything BUT the kernel?

Does this work on CLI?

Thanks for any hint.


You can add the package to the “ignore” list in /etc/pacman.conf.

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

So, you would add the line IgnorePkg = linux.



sudo nano /etc/pacman.conf


IgnorePackage = 

Add packages, space delimited. E.g.:

IgnorePkg = kdeconnect

Be very careful, a partial upgrade is dangerous.


Do you know the Arch wiki? It has all the answers for basic questions like this. The pacman page has a specific section about “Skip package from being upgraded”:


Thanks, so basically a configuration option and not a comandline option or fancy one-liner with pipe/grep/cut/whatsoever magic.

I thought it of sth. like

yay -Suy --skip linux*

but obviously there’s not such a thing.

There’s a reason for not making partial upgrades too easy… :wink:


yay -Syu --ignore=linux


I know this may be an example for a general question, but in this specific case if you don’t want the latest kernel then using linux-lts is the better choice than holding back a kernel update.

As an option to hanging onto the previous release for a while, linux-lqx only switches to a new series after a few point-releases.


Do you have any plans to include linux-lqx into your kernel-lts repo?
It would be an interesting addition. :sweat_smile:

There’s not any real need to, Damentz already has it available as a binary package:

OK, thanks for the into.

The --ignore option is nowhere advertised. It is not explained in the man page (man yay) nor in the help message (yay -h) .

And even more interesting: The same is true for paru.

Thanks for mentioning. How did you know?

pacman -Syu --ignore <package> should work as well, I guess.

1 Like

Thanks for all the input up to now!

–ignore for pacman/yay

Didn’t know that before. :+1:

You can get away with ignoring package updates from time to time, but you can also break your system with a partial update.

I would recommend updating everything or nothing whenever possible. Such is the way of rolling distros.

For kernels, if you want to run an older version, install it as a separate package, there are many to choose from.

Also, unless you have a good reason not to, you should be running linux-lts.

1 Like

man pacman

explains the --ignore option.

(This post was not meant only for @Kresimir … Sorry for any potential confusion)

Actually, it is…

-w, --downloadonly
Retrieve all packages from the server, but do not install/upgrade anything.

       Install packages non-explicitly; in other words, fake their install reason to be
       installed as a dependency. This is useful for makepkg and other build-from-source
       tools that need to install dependencies before building the package.

       Install packages explicitly; in other words, fake their install reason to be
       explicitly installed. This is useful if you want to mark a dependency as explicitly
       installed so it will not be removed by the --recursive remove operation.

   --ignore <package>
       Directs pacman to ignore upgrades of package even if there is one available. Multiple
       packages can be specified by separating them with a comma.

   --ignoregroup <group>
       Directs pacman to ignore upgrades of all packages in group, even if there is one
       available. Multiple groups can be specified by separating them with a comma.

Well, ok. This is pacman itself. Got it.

1 Like

yay too.

yay -hU

For an additional method, when using yay to upgrade your system, the list of packages is followed by:

==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)

You can just include the numbers of the packages you don’t want to update. This way, you don’t have to remember to update your ignorepkg line later.

That being said, instead of holding the kernel back, why not temporarily switch to the LTS kernel? That way you continue to get critical security and bug fixes.

1 Like