Complete uninstall to fix update problems

I have moved my n8n instance to a Pi 4, it runs beautifully.

However, it refuses to update.

I run the correct pm2 stop, update n8n commands and it completes without errors.

But n8n is never updated, I am falling further behind on release versions.

So I have tried to uninstall using sudo npm uninstall n8n --global, which went well.

I then installed using sudo npm install n8n -g (if I do not use sudo, I get errors about folder permissions) and it all completed successfully.

Restarted pm2 and n8n, I am somehow still running the same poxy version that I uninstalled!

How can I completely remove n8n (but retain workflows and credentials)?

Many thanks.

Hey @britaliano,

This will depend on the full steps you took to setting up node and npm on your pi, If you used nvm then it could just be a case of n8n running under a different user so you would need to change to that user to then do the update.

If you run a ps -ef | grep n8n it should give a list of all the processes running and the user running it, As another possible test you could also run pm2 stop and check if you can still access it.

Thank you for your reply.

I bit the bullet, installed n8n using docker and it just…worked.

Fingers crossed it stays as easy as this.

Thanks again.