Error: could not open file /var/lib/pacman/local/cuda-11.0.3-1/desc: No such file or directory

As an optional dependency of Blender, I installed Cuda from the official repository. But, every time I install, update or remove any package, software using pacman or yay, I get the following warning:
error: could not open file /var/lib/pacman/local/cuda-11.0.3-1/desc: No such file or directory.

I would try to clean the pacman cache and then to update the system:

sudo pacman -Scc
sudo pacman-mirrors -f && sudo pacman -Syyu

Afterwards check cuda by:

pacman -Qk cuda
1 Like

I had done that already and checking cuda shows this:
$ pacman -Qk cuda
error: could not open file /var/lib/pacman/local/cuda-11.0.3-1/files: No such file or directory
cuda: 0 total files, 0 missing files

I found the solution here:

1 Like