Cannot update n8n successfully

Presumably you have already stopped n8n using pm2 stop n8n before running npm install -g n8n@latest?

Are you by any chance doing anything else on your Raspi that might drive up CPU usage to unsustainable levels here? I am asking because I am running n8n with a very low CPU load (besides several other services consuming a lot more CPU power), though I am using a Pi 4 rather than a Pi Zero.

Another thing you might want to try would be to check whether your database might be the culprit here. If you are using a rather old version of n8n with SQLite, you might need to manually delete data as described in this thread (since a bug would have prevented automatic deletion of old executions from working as expected):