Unlinkat /var/snap/firefox/common/host-hunspell/en_US.aff: read-only file system

Hello.

I’m trying to remove the snap “firefox” on Ubuntu 22.10. Unfortunately an error prevents the task to be completed.

# snap list

Name    Version Rev   Tracking       Publisher Note

firefox 106.0-1 1969  latest/stable  mozilla   disabled 
snapd   2.58.2  18357 latest/stable  canonical snapd 

# snap disconnect firefox:host-hunspell
ok

# snap remove firefox

error : cannnot perform the following tasks :
remove data for the official snap "firefox" (1969) (Unlinkat /var/snap/firefox/common/host-hunspell/en_US.aff: read-only file system)

how to fix it ? thanks.

1 Like

try to first run:

sudo snap disconnect firefox:host-hunspell

and only then the snap remove command …

EDIT: BAH ! ignore me, i’m obviously blind !

you could try to use snap disable firefox first, that should unmount everything (but leave it around in disabled state), then the snap remove should work …

# snap disable firefox
error : cannot disable "firefox" ; snap "firefox" already disabled

# snap disconnect firefox:host-hunspell
ok

# snap remove firefox

error : cannnot perform the following tasks :
remove data for the official snap "firefox" (1969) (Unlinkat /var/snap/firefox/common/host-hunspell/en_US.aff: read-only file system)

I was able to to remove firefox by umounting the folder:

# umount /var/snap/firefox/common/host-hunspell
3 Likes

Hi ziomario,

I reproduced the problem.

The mount in question: /dev/mapper/vgubuntu-root on /var/snap/firefox/common/host-hunspell type ext4 (ro,noexec,noatime,errors=remount-ro)

For me, the issue only happens when firefox is disabled. I will provide more information on this behaviour shortly.

I can confirm that this issue can still occur on a fully up-to-date system. For me this happend after a clean install of Ubuntu 22.04.3 LTS with updates.

I wanted to remove snap-version of firefox 117 to then replace it with the traditional deb (mozilla ppa) version. It refused. Nothing too out of the ordinary was installed or configured to make that happen either. In the end, @StMartin81’s solution worked. Thanks.

1 Like