error: snap "thunderbird" has "remove-snap" change in progress

Bug #2130315 reported by Terry Coles
90
This bug affects 17 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
High
Unassigned

Bug Description

1) Kubuntu 24.04

2)
snapd 2.72 25577 latest/stable canonical✓ snapd
thunderbird 140.3.1esr-1 825 latest/stable/… canonical✓ disabled

3) Clean removal of thunderbird.

4) Removal hung up and I had to press cancel in Discover.

When I tried to remove it using konsole, I got:

terry@optiplex:~$ sudo snap remove thunderbird
error: snap "thunderbird" has "remove-snap" change in progress

I cannot now install Thunderbird because the broken package prevents it.

How can I abort the broken remove: I have tried various combinations of 'abort' in the shell, but nothing works.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Antoine Dubouis (adubouis) wrote :

Same problem for me... I just install Kubuntu yesterday, I tried to install Thunderbird, maybe I did a bad action...
Thunderbird wasn't working...
When I search a little bit, I found that Thunderbird was installed with snap system...
I tried to remove it but it didn't worked.

$ snap changes
6 Done aujourd'hui à 12h17, heure des Rocheuses aujourd'hui à 12h18, heure des Rocheuses Installer le paquet Snap "discord"
7 Undo aujourd'hui à 16h29, heure des Rocheuses - Supprimer le paquet Snap "thunderbird"
8 Done aujourd'hui à 17h15, heure des Rocheuses aujourd'hui à 17h15, heure des Rocheuses Actualiser le paquet Snap "core22"

 When I run the command

$ sudo snap remove thunderbird

I get this msg :

erreur : snap "thunderbird" has "remove-snap" change in progress

tried to find a solution, but I didn't find one.
I tried the command :

$ sudo snap abort 7

But nothing changed...

Do you find a solution ?

Revision history for this message
Miguel Pires (miguelpires1) wrote :

Hi. Thanks for reporting this. Could you run:
$ snap change 7

And paste the result here please?

Revision history for this message
Antoine Dubouis (adubouis) wrote :
Download full text (4.8 KiB)

Thanks for your answer

tonio@toniokountou:~$ snap change 7
État Descendance Prêt Résumé
Undo aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h29, heure des Rocheuses Arrêter les services du paquet Snap "thunderbird"
Undo aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h29, heure des Rocheuses Lancer la suppression du point d'accroche du snap "thunderbird" si existant
Done aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 17h49, heure des Rocheuses Déconnecter les interfaces du snap "thunderbird"
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Save data of snap "thunderbird" in automatic snapshot set #1
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Supprimer les alias pour le paquet Snap "thunderbird"
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Rendre indisponible le paquet Snap "thunderbird" pour le système
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Supprimer le profil de sécurité du paquet Snap "thunderbird" (769)
Error aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Supprimer les données du paquet Snap "thunderbird" (769)
Hold aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Supprimer le paquet Snap "thunderbird" (769) du système
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:opengl de snapd:opengl
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:sound-themes de gtk-common-themes:sound-themes
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:browser-sandbox de snapd:browser-support
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:etc-thunderbird de snapd:system-files
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:removable-media de snapd:removable-media
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:icon-themes de gtk-common-themes:icon-themes
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:cups-control de snapd:cups-control
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:audio-playback de snapd:audio-playback
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:desktop-legacy de snapd:desktop-legacy
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:dot-thunderbird de snapd:personal-files
Undone aujourd'hui à 16h29, heure des Rocheuses aujourd'hui à 16h30, heure des Rocheuses Déconnecter thunderbird:home de snapd:...

Read more...

Revision history for this message
Antoine Dubouis (adubouis) wrote :

Problem : in my /home/tonio/snap/ I don't have thunderbird directory

I will try to create one

Revision history for this message
Antoine Dubouis (adubouis) wrote :

It was not working...

Revision history for this message
Antoine Dubouis (adubouis) wrote :

I will try to reboot

Revision history for this message
Antoine Dubouis (adubouis) wrote :

Ok. forget me, I give up (3 hours I tried to resolve this problem).
I will reinstall another distribution...
Thanks to you.

Revision history for this message
Terry Coles (terryjcoles) wrote :
Download full text (6.2 KiB)

Hi,

Original poster here. I tried running snap change 28 (28 was the thunderbird ID) and got much the same output as Antoine, culminating in:

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

2025-10-30T07:12:03Z INFO cannot link snap "thunderbird" back, some of its data has already been removed

......................................................................
Remove data for snap "thunderbird" (825)

2025-10-30T07:12:03Z ERROR failed to remove snap "thunderbird" base directory: remove /home/terry/snap/thunderbird: directory not empty

Unlike Antoine, I did have a thunderbird directory:

terry@optiplex:~$ cd /home/terry/snap/thunderbird
terry@optiplex:~/snap/thunderbird$ ls
812

Directory 812 turned out to contain hidden files and directories:

terry@optiplex:~/snap/thunderbird/812$ ls -la
total 20
drwxr-xr-x 4 terry terry 4096 Sep 25 07:51 .
drwxr-xr-x 3 terry terry 4096 Oct 30 07:12 ..
drwx------ 9 terry terry 4096 Oct 10 14:58 .config
-rw-rw-r-- 1 terry terry 31 Sep 25 07:51 .last_revision
drwxrwxr-x 3 terry terry 4096 May 22 2024 .local
lrwxrwxrwx 1 terry terry 37 Sep 25 07:51 .themes -> /snap/thunderbird/812/data-dir/themes

So I removed everything with rm -r, including the thunderbird directory and tried to install it again. That seems to have made things worse because I now have:

terry@optiplex:~/snap$ snap changes
ID Status Spawn Ready Summary
28 Undo 21 days ago, at 07:07 GMT - Remove "thunderbird" snap
38 Error yesterday at 15:16 GMT yesterday at 15:16 GMT Auto-refresh snap "firefox"
39 Done today at 06:57 GMT today at 06:58 GMT Auto-refresh snaps "chromium", "core18"
40 Done today at 07:17 GMT today at 07:20 GMT Refresh "gnome-46-2404" snap

terry@optiplex:~/snap$ snap install thunderbird
snap "thunderbird" is already installed, see 'snap help refresh'
t

terry@optiplex:~$ snap change 28
Status Spawn Ready Summary
Undo 21 days ago, at 07:07 GMT 21 days ago, at 07:07 GMT Stop snap "thunderbird" services
Undo 21 days ago, at 07:07 GMT 21 days ago, at 07:07 GMT Run remove hook of "thunderbird" snap if present
Done 21 days ago, at 07:07 GMT today at 07:02 GMT Disconnect interfaces of snap "thunderbird"
Undone 21 days ago, at 07:07 GMT 21 days ago, at 07:12 GMT Save data of snap "thunderbird" in automatic snapshot set #3
Undone 21 days ago, at 07:07 GMT 21 days ago, at 07:12 GMT Remove aliases for snap "thunderbird"
Undone 21 days ago, at 07:07 GMT 21 days ago, at 07:12 GMT Make snap "thunderbird" unavailable to the system
Undone 21 days ago, at 07:07 GMT 21 days ago, at 07:12 GMT Remove security profile for snap "thunderbird" (825)
Done 21 days ago, at 07:07 GMT today at 07:02 GMT Remove data for snap "thunderbird" (769)
Done 21 days ago, at 07:07 GMT today at 07:02 GMT Remove snap "thunderbird" (769) from the system
Error 21 days ago, at 07:07 GMT 21 days ago, at 07:12 GMT Remove data for snap "thunderbird" (825)
Hold 21 days...

Read more...

Revision history for this message
Miguel Pires (miguelpires1) wrote :

Hi Terry. Thank you for the output you shared. I haven't been able to reproduce this issue but the logs around that time might carry more information. Could you share the output of:

$ journalctl -u snapd --no-pager --since "2025-10-30 06:30:00Z" --until "2025-10-30 07:30:00Z"

Thanks again for your help.

Revision history for this message
Terry Coles (terryjcoles) wrote :
Revision history for this message
Peter Croft (petercroft) wrote :

Hi Miguel,

I have a similar problem. It started with a message saying Thunderbird would update when I exited it. I did so and nothing seemed to happen so I tried some more and ended up starting the update myself. I can’t remember precisely what happened but I think I did give up waiting and ended up unable to proceed, with ‘error: snap "thunderbird" has "remove-snap" change in progress’.
I attach the change log and journal extract.

Thanks,
Peter

Nick Dyer (ndyer)
summary: - error: snap "thuderbird" has "remove-snap" change in progress
+ error: snap "thunderbird" has "remove-snap" change in progress
Revision history for this message
Miguel Pires (miguelpires1) wrote :

Hi. Thanks for the data. I think there are two separate issues going on. One is the failure to remove the data which triggers the attempted reversal. The second (and arguably more serious) issue is that the change becomes stuck after we fail to relink the snap because the remove hook can't run. I'm fairly certain the second problem was fixed in 2.73 which is currently in the beta channel.

Could you try to refresh snapd to that version and then check if the removal change is unblocked?

$ snap refresh --channel latest/beta snapd
$ snap changes # get the change ID for the removal in "Undo" state
$ snap change <ID>

Revision history for this message
Peter Croft (petercroft) wrote :

Hi Miguel.
I just tried that but it failed on the refresh -

peter@poplar2:~$ snap refresh --channel latest/beta snapd
error: snap "snapd" has "remove-snap" change in progress

Peter

Revision history for this message
Terry Coles (terryjcoles) wrote :

Miguel,

I have exactly the same result as Peter.

Changed in snapd (Ubuntu):
importance: Undecided → High
Revision history for this message
Miguel Pires (miguelpires1) wrote :

Thanks for your responses. We'll have to remove the hanging change manually before we can move to 2.73. The following steps should remove the hanging change and move snapd to a version with the fix:

# install jq, if not already installed
$ sudo apt install jq

# get the ID of the hanging remove change, I'll refer to it below as <ID>
$ snap changes

# stop snapd and backup its state
$ sudo systemctl stop snapd.{service,socket}
$ sudo cp /var/lib/snapd/state.json /var/lib/snapd/state.json.bk

# remove the offending change. Replace <ID> with the change ID obtained above but keep the surrounding double quotes
$ sudo jq 'del(.changes."<ID>")' /var/lib/snapd/state.json > state.json.new
$ sudo mv state.json.new /var/lib/snapd/state.json

# start snapd and refresh to a release with the fix
$ sudo systemctl start snapd.{socket,service}
$ sudo snap refresh --channel latest/beta snapd

This should resolve the issue of the hanging change. Please let me know if you were able to resolve this.

Regarding the issue that triggered this, it's not clear from the logs why there were files left in the snap user data and I wasn't able to reproduce it with thunderbird. We're planning to do some work on improving the reliability of `snap remove`. I've made a note of this issue internally so we spend some more time on it when we start that.

Revision history for this message
Terry Coles (terryjcoles) wrote :

Miguel,

That worked for me. Thanks.

Revision history for this message
Peter Croft (petercroft) wrote :

Me too, the refresh worked. Thanks Miguel.
Is there anything I should do to try to revive Thunderbird or should I just wait for you guys?
Peter

Revision history for this message
Terry Coles (terryjcoles) wrote :

Peter,

I had been running Thunderbird from the binary available on the TBird site. I simply uninstalled that and reinstalled it using snap.

It even remembered my Accounts, etc.

Revision history for this message
Peter Croft (petercroft) wrote :

Hi Terry,
I have downloaded thunderbird-146.0.tar.xz and unzipped it and can run thunderbird.bin, but it doesn't pick up the old accounts. I don't understand snap well enough to know how to use it to do the install in this process - but should I do that to reference the old setup? Where's the best documentation for it?
Thanks, Peter

Revision history for this message
Terry Coles (terryjcoles) wrote :

Peter,

I only installed the binary because I was unable to re-install the snap, owing to this problem. Once the bug had been fixed I went back to the snap installation and removed the binary, by deleting the files on my disc.

I'm not sure which distro you are running, but in K(U)buntu, I simply opened Discover and chose the Thunderbird instance labelled 'snap'. If all else fails, you should be able to install the snap version using:

  snap install thunderbird

Revision history for this message
Peter Croft (petercroft) wrote :

Terry,
Oh I see, I misunderstood you.
When I do the standard install it says it's already installed -

peter@poplar2:~$ snap install thunderbird
snap "thunderbird" is already installed, see 'snap help refresh'

And snap list gives -
thunderbird 140.3.1esr-1 825 latest/stable canonical✓ disabled

So I think the other problem which Miguel referred to applies to my situation and I need that resolved before I continue with snaps.
I guess I could simply run the binary I got but I am not sure of the implications. I am running Ubuntu btw.

Revision history for this message
Terry Coles (terryjcoles) wrote :

Peter.

I ran with the binary for a month or two. The only problem that I had is that it didn't find my Accounts, etc, which was a problem for me because I have hundreds of Identities pointing to my 5 or 6 mailboxes.

When I re-installed the snap version all my data was restored.

Revision history for this message
Peter Croft (petercroft) wrote :

Hi Miguel,
Happy New Year.
Is there any news on this please, or can you tell us a ball park date when it might be sorted?
I am keen to be able to access my old emails from before this arose, and to have the account and folder structure restored.
Thanks, Peter

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.