Updates 2024-12-16 - Aborting update with “exists in filesystem”

Hi Guys…
I am having some weird trouble. I logout from Plasma, switch to a console, and run sudo pacman -Syu and after downloading all the packages, it try to update and abort with “exists in filesystem”. But I can’t find information in pacman.log.
What should I do? Do I need to use --overwrite? It’s the first time in several years that I get this error. Mostly are node modules that I don’t recognize.

redirected stderr to file

Thanks.

Edit: Hmmm… now I remember that I upgrade npm with:

sudo npm install -g npm@10.9.2

due to a warning I receive. That must be it.
Is there a way for pacman to acknoledge this without uninstalling and installing again?

Your issue is caused because you - at some point - has used sudo to install those modules globally.

It is difficult to advise what cause of action you should choose.

For a long time Manjaro team has recommended to not use sudo but instead use a node version manager like nvm or pnpm.

You can of course use the --overwrite but the best would be to solve the underlying issue.

You could uninstall

 sudo pacman -R npm

Then reinstall

sudo pacman -S npm
2 Likes

Hi Bud!

I tried uninstall with:

sudo pacman -R npm

and it did it “successfully”. For pacman npm 10.9.2 didn’t exist, so it deleted all the files registered in the npm 10.9.0 package. So when I tried to install it again with:

sudo pacman -S npm

it gave the same error than before, because those 10.8.2 files still “exists in filesystem”.
So I manually move the conflicting files from /usr/lib to another location and installed npm without problems. Not the best elegant solution that I was hoping but so far it worked. I have another libraries in that directory (in the old one) that are not in the main package, but I think are mostly AUR packages dependencies that I hope reacquire when needed to recompile.

Edit: Yes, I did mess things up. I had to reinstall some packages to leave node operational (I leave it here in case it helps another soul):

sudo pacman -S --overwrite * semver
sudo pacman -S --overwrite * nodejs-nopt

Now I get a good (and empty) npm healthcheck.
Will see. (may be the best option was to use --overwrite after all! LOL).

Thanks.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.