Can't forcefully remove Spotify snap

See this AskUbutu thread.

I ran sudo snap remove spotify, but it hung for a long time and I had to kill the command by sending it a SIGQUIT (Ctrl + \) since it didn’t respond with a SIQINT (Ctrl + c)

I tried running the command again but its now in this weird stuck state where it says it’s installed but cannot be removed.

Here is some diagnostic information:

$ snap changes
ID   Status  Spawn               Ready               Summary
153  Done    today at 16:15 CDT  today at 16:16 CDT  Auto-refresh snap "spotify"
154  Error   today at 21:35 CDT  today at 21:44 CDT  Remove "spotify" snap
155  Abort   today at 21:44 CDT  -                   Remove "spotify" snap
$ sudo snap install spotify
snap "spotify" is already installed, see 'snap help refresh'
$ sudo snap refresh spotify
snap "spotify" has no updates available
$ sudo snap remove --purge spotify
error: snap "spotify" has "remove-snap" change in progress

I tried googling but I can’t find anything about forcefully removing the snap.

How do I force snap to delete this snap?

Can you attach the ooutput of snap change 154 ? Also, are you sure there isn’t an instance of spotify running in the background?

Just had the same thing happen.

this is my output:

Status  Spawn               Ready               Summary
Undo    today at 09:11 EDT  today at 09:11 EDT  Stop snap "spotify" services
Undo    today at 09:11 EDT  today at 09:11 EDT  Run remove hook of "spotify" snap if present
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect interfaces of snap "spotify"
Abort   today at 09:11 EDT  -                   Save data of snap "spotify" in automatic snapshot set #3
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove aliases for snap "spotify"
Hold    today at 09:11 EDT  today at 09:12 EDT  Make snap "spotify" unavailable to the system
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove security profile for snap "spotify" (60)
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove data for snap "spotify" (58)
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove snap "spotify" (58) from the system
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove data for snap "spotify" (60)
Hold    today at 09:11 EDT  today at 09:12 EDT  Remove snap "spotify" (60) from the system
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:gtk-3-themes from gtk-common-themes:gtk-3-themes
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:opengl from snapd:opengl
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:desktop from snapd:desktop
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:wayland from snapd:wayland
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:sound-themes from gtk-common-themes:sound-themes
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:desktop-legacy from snapd:desktop-legacy
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:browser-support from snapd:browser-support
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:x11 from snapd:x11
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:icon-themes from gtk-common-themes:icon-themes
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:gsettings from snapd:gsettings
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:audio-playback from snapd:audio-playback
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:network from snapd:network
Undo    today at 09:11 EDT  today at 09:11 EDT  Disconnect spotify:home from snapd:home

you seem to have stopped the process with something like ctrl-c while it tried to store a snapshot (backup) of your data before removal, which is snap default behavior when removing a snap … if you do not care about keeping your app data, caches, login data, etc. for a potential re-install of the snap you can use the --purge option to the snap remove ... command, that will skip taking a snapshot and simply remove everything right away.

Already tried that, that’s what was giving me the error

sudo snap remove --purge spotify 
error: snap "spotify" has "remove-snap" change in progress

what is snap changes reporting ?

$ sudo snap changes
ID   Status  Spawn                   Ready                   Summary
311  Done    yesterday at 11:14 EDT  yesterday at 11:14 EDT  Pre-download tasks for auto-refresh
312  Error   yesterday at 11:14 EDT  yesterday at 11:15 EDT  Auto-refresh snaps "bitwarden", "gnome-3-34-1804", "spotify"
313  Done    yesterday at 13:34 EDT  yesterday at 13:35 EDT  Pre-download tasks for auto-refresh
314  Error   yesterday at 13:34 EDT  yesterday at 13:35 EDT  Auto-refresh snap "spotify"
315  Done    yesterday at 20:34 EDT  yesterday at 20:34 EDT  Pre-download tasks for auto-refresh
316  Error   yesterday at 20:34 EDT  yesterday at 20:35 EDT  Auto-refresh snaps "gnome-3-38-2004", "spotify"
317  Done    today at 01:39 EDT      today at 01:39 EDT      Pre-download tasks for auto-refresh
318  Error   today at 01:39 EDT      today at 01:40 EDT      Auto-refresh snaps "firefox", "spotify"
319  Abort   today at 09:11 EDT      -                       Remove "spotify" snap

hmm, so it is already in abort state … you could try to force it by calling snap abort 319 not sure if that will actually help though since it thinks it is already aborting …

Lol I tried that as well.

I ended up restarting and everything started working again. I thought my Spotify install was having an issue because nothing would play, turns out it was just a Spotify outage that has resolved itself

1 Like

:joy:

1 Like