Can't update system because of zfs-linux dependency even though zfs update is available

I installed zfs-linux from the AUR with yay. I now can’t update the system because I get the following error message

failed to prepare transaction (could not satisfy dependencies)
:: installing linux (5.15.2.arch1-1) breaks dependency ‘linux=5.14.16.arch1-1’ required by zfs-linux
→ error installing repo packages

From the arch wiki I understand that this is to be expected if zfs-linux hasn’t been updated yet, but it has. When I first remove zfs-linux with

yay -R zfs-linux

then update the system with

yay

and install zfs linux again with

yay -S zfs-linux

everything installed just fine and my system is up to date.

Is this what is called a dependency loop?
I don’t want to have to un- and re-install zfs-linux every time I update, what is the proper way to solve this in the future?

If you are using zfs on a critical drive such as /, I would recommend adding the archzfs repo above the arch repos in pacman.conf. Then it will just magically work.

If you are only using zfs for storage devices, I would switch to zfs-dkms which should make that process cleaner.

4 Likes