Accidentally removed Spotify folder, now I can't uninstall anything

I accidentally removed Spotify folder and now I can't uninstall programs from with apt-get or the Software Center, when I try to remove the flash plugin from the command line it give me this error:

/var/lib/dpkg/info/spotify-client.postinst: 5: /var/lib/dpkg/info/spotify-client.postinst: ./register.sh: not found
dpkg: error processing package spotify-client (--configure): subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing: spotify-client
E: Sub-process /usr/bin/dpkg returned an error code (1)

What to do?

4

3 Answers

Since it seems, that the Spotify package is still in the “configured” state, but had some of its files removed, you need to reinstall it first:

sudo apt-get install -f --reinstall spotify-client

Then you should be able to uninstall it normally:

sudo apt-get remove spotify-client
2

Download the spotify-client deb package from the repo:

cd ~/Downloads && apt-get download spotify-client

Install it with dpkg

sudo dpkg -i --force-all --no-triggers downloaded_deb

If it works, you will be able to remove it properly.

If it doesn't work but returns 127 error, you may need to reinstall dpkg, this is a tip to overcome the uncompleted installation of a package (In your case, the folder of Spotify was accidentally removed). As soon as dpkg is reinstalled, you redo the command sudo dpkg -i --force-all --no-triggers downloaded_deb.

5

Did you try?

 sudo apt-get purge spotify-client sudo apt-get install -f spotify-client
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like