12

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

7 Answers 7

22

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.

4

You can change schedule for automatic updates

Managing updates | Snapcraft documentation

1
  • This does not word on fedora, brings up 'unknown flag hold'
    – Cheetaiean
    Jan 16 at 3:10
3

There is currently no way to forcibly remove a snap when a refresh is in process.

Once the refresh is finished, you can speed up the snap removal by skipping the backup using --purge. Normally, when a snap is removed, the data of that snap is backed up. This backup can take some time.

snap remove --purge android-studio 

Note that this command will remove all data from that snap.

0
1

Downgrading to the previous version (removing changes done by the update) first will solve this problem, after which allow you to also delete the snap package with no errors:

[rodolfo@fedora ~]$ sudo snap revert discord 
discord reverted to 0.0.13

[rodolfo@fedora ~]$ sudo snap remove discord 
discord removed
0
0

Check snap changes then note down the ID

sudo snap changes                                          10 ↵  
ID   Status  Spawn                   Ready                   Summary
746  Done    yesterday at 01:28 IST  yesterday at 01:30 IST  Pre-download "android-studio" for auto-refresh
747  Done    yesterday at 12:24 IST  yesterday at 12:26 IST  Pre-download "android-studio" for auto-refresh
748  Done    yesterday at 22:29 IST  today at 07:25 IST      Pre-download "android-studio" for auto-refresh
749  Done    today at 07:41 IST      today at 07:42 IST      Pre-download "android-studio" for auto-refresh
750  Error   today at 09:57 IST      today at 09:59 IST      Auto-refresh snap "android-studio"
751  Doing   today at 10:00 IST      -                       Auto-refresh snap "android-studio"

Then run abort

sudo snap abort 751

Wait for a few min then refresh/remove manually

 sudo snap refresh android-studio
-3

You can add the parameter "now" to the end of your command, it will ignore the "auto-refresh".

example:

sudo snap remove android-studio now
1
  • 4
    This command tries to remove the snaps named android-studio and now. It will not actually force the removal. Aug 13, 2020 at 15:50
-4

The way it worked for me was the parameter force instead of now

sudo snap remove android-studio force
1
  • 5
    This command tries to remove the snaps named android-studio and force. It will not actually force the removal. Aug 13, 2020 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .