Pacman -R cant find the target, but which can find it

I use espanso now I want to remove it and upgrade to v2.

When uninstalling the old version, some errors come up. What make it a little strange now.

If I run command pacman -R espanso I get the following error: target not found.

But when I run which espanso I can find the espanso in /usr/bin, and it is there.

What should I do now? Can I just delete the espanso in /usr/bin?

Espanso is from the AUR. If pacman had issues uninstalling it (would have been really nice to see those error messages), you can try re-installing it from the AUR, making your package manager overwrite the existing files. As far as I know yay supports the pacman syntax, so you could so yay -S espanso --overwrite "*", which will re-install espanso (the new version) and overwrite any conflicting files it finds during the operation.

1 Like

Did you install the espanso package, or a related one, like espanso-bin?
https://aur.archlinux.org/packages?K=espanso

2 Likes

If you use an AUR helper like yay, you can search for related packages and see which of them is actually installed:

yay espanso

If you don’t use any, you can also do

pamac search espanso

ok, it’s only the first step. which find application. After, find the package name:
pacman -Qo /usr/bin/espanso

Now we can remove the package.
Note: pacman not remove applications but only packages :wink:

2 Likes

Can I just delete the espanso in /usr/bin?

Do not do this.

You can search for the exact package name with pacman -Q | grep espanso and then remove it