30

In Ubuntu 22.04 the Firefox snap was installed by default. I removed it using the command sudo snap remove firefox, but inside the filesystem in /var/lib/snapd/seed/snaps there exists a Firefox snap locked package which is about 163MB in size. How can I remove that?

enter image description here

karel
  • 122,292
  • 133
  • 301
  • 332
ABHILASH T
  • 2,623

4 Answers4

67

Warning: The following command will remove Firefox completely - including the locally saved profile.


For those who get the error in Ubuntu 22.04:

$ sudo snap remove --purge firefox
error: cannot perform the following tasks:
- Remove data for snap "firefox" (1943) (unlinkat /var/snap/firefox/common/host-hunspell/en_ZA.dic: read-only file system)

Verify that indeed /var/snap/firefox/common/host-hunspell is mounted as an ext4 file system using lsblk -fe7 -o+ro

If so, stop the Firefox service

$ sudo systemctl stop var-snap-firefox-common-host\\x2dhunspell.mount
$ sudo systemctl disable var-snap-firefox-common-host\\x2dhunspell.mount 
Removed /etc/systemd/system/default.target.wants/var-snap-firefox-common-host\x2dhunspell.mount.
Removed /etc/systemd/system/multi-user.target.wants/var-snap-firefox-common-host\x2dhunspell.mount.

Then the uninstall command should work:

sudo snap remove firefox
17

You used sudo snap remove firefox but you should have used

  • snap disable firefox
  • snap remove --purge firefox

reference

graham
  • 13,061
10

The following commands can be used to remove Firefox snap:

sudo umount /var/snap/firefox/common/host-hunspell
sudo snap remove firefox
Artur Meinild
  • 31,035
mosomedve
  • 101
3

Files in that folder (/var/lib/snapd/seed/snaps) came pre-installed with the operating system. No snap command will remove them. Deleting them manually will remove them, but can potentially break something eventually maybe. If you won't be using the firefox snap, most likely it's fine to just manually delete the file, but there is always the potential that it may break something later.

If you want to install Firefox as a .deb, you can follow the instructions here to install the Mozilla PPA and prevent apt from "updating" to a snap automatically.

Esther
  • 3,932