Unable to remove snap

Hello, after some googling I haven’t been able to solve my issue so I am looking for any kind of advice here.

I tried to uninstall Acestreamplayer snap but I interrupted the process (my bad). Since them I cannot uninstall o reinstall.

root@bossanova:~# snap remove --purge acestreamplayer
error: snap "acestreamplayer" has "remove-snap" change in progress
root@bossanova:~# snap changes
ID   Status  Spawn                   Ready                   Summary
223  Done    yesterday at 14:45 CET  yesterday at 14:45 CET  Change configuration of "core" snap
224  Undo    yesterday at 14:47 CET  -                       Remove "acestreamplayer" snap

root@bossanova:~# snap abort 224
root@bossanova:~# snap changes
ID   Status  Spawn                   Ready                   Summary
223  Done    yesterday at 14:45 CET  yesterday at 14:45 CET  Change configuration of "core" snap
224  Undo    yesterday at 14:47 CET  -                       Remove "acestreamplayer" snap

root@bossanova:~# snap tasks 224
Status  Spawn                   Ready                   Summary
Undo    yesterday at 14:47 CET  yesterday at 14:47 CET  Stop snap "acestreamplayer" services
Undo    yesterday at 14:47 CET  yesterday at 14:47 CET  Run remove hook of "acestreamplayer" snap if present
Done    yesterday at 14:47 CET  today at 10:22 CET      Disconnect interfaces of snap "acestreamplayer"
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Remove aliases for snap "acestreamplayer"
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Make snap "acestreamplayer" unavailable to the system
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Remove security profile for snap "acestreamplayer" (18)
Error   yesterday at 14:47 CET  yesterday at 14:47 CET  Remove data for snap "acestreamplayer" (18)
Hold    yesterday at 14:47 CET  yesterday at 14:47 CET  Remove snap "acestreamplayer" (18) from the system
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:optical-drive from snapd:optical-drive
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:network-bind from snapd:network-bind
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:pulseaudio from snapd:pulseaudio
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:gsettings from snapd:gsettings
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:desktop from snapd:desktop
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:desktop-legacy from snapd:desktop-legacy
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:opengl from snapd:opengl
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:unity7 from snapd:unity7
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:home from snapd:home
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:network from snapd:network
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:screen-inhibit-control from snapd:screen-inhibit-control
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:audio-playback from snapd:audio-playback
Undone  yesterday at 14:47 CET  yesterday at 14:47 CET  Disconnect acestreamplayer:x11 from snapd:x11

......................................................................
Make snap "acestreamplayer" unavailable to the system

2025-12-08T14:47:16+01:00 INFO cannot link snap "acestreamplayer" back, some of its data has already been removed

......................................................................
Remove data for snap "acestreamplayer" (18)

2025-12-08T14:47:16+01:00 ERROR failed to remove snap "acestreamplayer" base directory: remove /home/paco/snap/acestreamplayer: directory not empty

I’ve also tried rebooting the computer but the error message remains. Any idea would be greatly appreciated.

Best regards and thank you.

Try removing the ~/snap/acestreamplayer folder if it’s available and try agian, there seems to be a bug that snapd can’t successfully cleaning up this directory recently.

Thank you for your answer. I’ve removed the folder and rebooted the server but the error message keeps appearing when I try to uninstall the snap.

Maybe you multi-user on the system? Whats the output of ls -lad /home/paco/snap/acestreamplayer? Does the task log still read

1 Like

Thank you for your help. I removed manually /home/paco/snap/acestreamplayer so the command does not show anything.

I don’t understand what do you mean with the task log still read.

Thanks again.

I meant the error you posted also said that failed to remove /home/paco/snap/acestreamplayer: directory not empty. So did you remove exactly that directory? Then this error message afterwards should not exist. If the directory does not exist and you still get the error message this is clearly a bug.

Background: The problem i thought of was that you removed another home directory and that /home/paco is another one with unusual mounting or permission system.

Another reason for failure could be that you manually deleted some stuff before doing snap remove acestreamplayer. In that case you could try to refresh the snap so it gets back into a known state and remove afterwards.

Hi. This might be the same issue observed in Bug #2130315 “error: snap “thunderbird” has “remove-snap” change...” : Bugs : snapd package : Ubuntu

There was a bug in undoing failed removals that could cause the change to hang. This was fixed in 2.73 which is currently in beta. If you’re still experiencing this issue (the “Run remove hook …” task is stuck in “Undo”), please follow the steps in Comment #16 : Bug #2130315 : Bugs : snapd package : Ubuntu to unblock it and move to 2.73.

Thanks,

Miguel

1 Like

Thanks Miguel. I have followed your post but I get the same error message.

root@bossanova:~# apt install jq
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
jq ya está en su versión más reciente (1.6-2.1+deb12u1).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
root@bossanova:~# snap changes
ID   Status  Spawn                     Ready               Summary
224  Undo    4 days ago, at 14:47 CET  -                   Remove "acestreamplayer" snap
225  Done    today at 08:19 CET        today at 08:19 CET  Refresh all snaps: no updates

root@bossanova:~# systemctl stop snapd.{service,socket}
root@bossanova:~#  cp -p /var/lib/snapd/state.json /var/lib/snapd/state.json_20251212
root@bossanova:~# ls -sla /var/lib/snapd/state.json*
100 -rw------- 1 root root 99759 dic 12 13:44 /var/lib/snapd/state.json
100 -rw------- 1 root root 99759 dic 12 13:44 /var/lib/snapd/state.json_20251212
root@bossanova:~# jq 'del(.changes."<224>")' /var/lib/snapd/state.json > state.json.new
root@bossanova:~# mv state.json.new /var/lib/snapd/state.json
root@bossanova:~# systemctl start snapd.{socket,service}
root@bossanova:~# snap refresh --channel latest/beta snapd
error: snap "snapd" has "remove-snap" change in progress
root@bossanova:~# snap changes
ID   Status  Spawn                     Ready               Summary
224  Undo    4 days ago, at 14:47 CET  -                   Remove "acestreamplayer" snap
225  Done    today at 08:19 CET        today at 08:19 CET  Refresh all snaps: no updates
226  Done    today at 13:50 CET        today at 13:50 CET  Auto-refresh snap "core24"

Hi,

The change ID shouldn’t have <> around it. This line:

# jq 'del(.changes."<224>")' /var/lib/snapd/state.json > state.json.new

Should be:

# jq 'del(.changes."224")' /var/lib/snapd/state.json > state.json.new

Can you try that and let me know if the issue persists? Thanks.

Hello, it has worked! Thank you so much.

root@bossanova:~# systemctl stop snapd.{service,socket}
root@bossanova:~# cp -p /var/lib/snapd/state.json /var/lib/snapd/state.json_20251215
root@bossanova:~# jq 'del(.changes."224")' /var/lib/snapd/state.json > state.json.new
root@bossanova:~# mv state.json.new /var/lib/snapd/state.json
root@bossanova:~# systemctl start snapd.{socket,service}
root@bossanova:~# snap refresh --channel latest/beta snapd
2025-12-15T12:39:30+01:00 INFO Waiting for automatic snapd restart...
2025-12-15T12:39:31+01:00 INFO Waiting for automatic snapd restart...
2025-12-15T12:39:32+01:00 INFO Waiting for automatic snapd restart...
2025-12-15T12:39:33+01:00 INFO Waiting for automatic snapd restart...
snapd (beta) 2.73 from Canonical✓ refreshed
root@bossanova:~# snap changes
ID   Status  Spawn               Ready               Summary
227  Done    today at 12:39 CET  today at 12:39 CET  Refresh "snapd" snap from "latest/beta" channel
root@bossanova:~# snap remove acestreamplayer
acestreamplayer removed (snap data snapshot saved)
root@bossanova:~# snap install acestreamplayer
acestreamplayer 3.2.11-snap1 from vasilisc installed
1 Like