Ubuntu – Snap not allowing me to remove or refresh anything

snap

I installed my dev tools via snap, big updates came out for most of them recently (Jetbrains), biggest being Android studio. But no matter what I do I can't remove or update any of my applications installed via snap.

When I try to remove the snap, I get the following error message:

error: snap "android-studio" has "auto-refresh" change in progress

I tried disabling "auto-refresh" with a bunch of other recommendations from other questions and threads.

I would like to specify when I want to update. Is there any way to update snaps like regular APT packages?

When I run "snap refresh", I get the following error:

error: change finished in status "Hold" with no error message

Best Answer

This was the top search item for the topic as I was trying to remove a snap whilst it was "auto-refreshing". The better answer in that it allows you to stop the refresh and take action is covered in Ask Ubuntu.

In effect:

# Check for snap changes
sudo snap changes

# This will list something like
ID         Status   Spawn                  Ready   Summary
<number>   Doing    today at 10:58 CEST    -       Auto-refresh snap <snap_program>

# Note the ID for the refresh and abort it
sudo snap abort <number>

# You must check changes until it has been actioned
sudo snap changes

# This will now list something like
ID         Status   Spawn                  Ready   Summary
<number>   Error    today at 10:58 CEST    -       Auto-refresh snap <snap_program>

# The take remedial action, in my case remove
sudo snap remove <snap_program>

Tested with microk8s on Ubuntu 18.04 and chromium on Ubuntu 20.04.