How to Fix Firefox Crashes on Ubuntu 21.10+21 Mar 2022
If you use Firefox on Ubuntu, you might have noticed that Firefox seems less
stable in Ubuntu 21.10+ (including Firefox 22.04 LTS!). By default, Ubuntu
21.10+ installs Firefox as a snap rather than as a
Unfortunately, the snap version of Firefox currently suffers from several
problems that can lead to a bad user experience – crashes and slow startup time
are among the top complaints.
Here are some of the problems currently plaguing the snap version of Firefox (as of March, 2022):
- Slow startup. It’s a well-known issue that snaps can take longer to start
than their non-snap equivalents, and the snap version of Firefox takes
noticeably longer to start than the
- Crashes. When I was using the snap version of Firefox, I experienced seemingly random crashes at least once a day. Snaps automatically update themselves in the background, and apparently the update process can cause crashes. From the bug discussion, it appears this might be more of a problem with snapd than with Firefox itself. Either way, it’s a horrible user experience.
- Inability to install Gnome Extensions via the browser plugin.
- Other random issues, like this
one where typing
localhostin the URL bar doesn’t work without
- There’s a snap meta bug with links to various other problems with the snap distribution of Firefox.
So what can you do if you’re affected by these problems? At least for now, the
best thing to do is to simply stop using the snap version of Ubuntu. Instead,
you can install the
.deb package using apt or you can download and install a
self-contained zip version built by Mozilla. After installing Ubuntu 22.04, I
personally switched to the zip version since the
.deb is no longer available
in the official Ubuntu repositories. The zip version is self-updating (if
installed with the right permissions) and doesn’t require adding a PPA.
Remove Firefox Snap
Regardless which method you choose, here’s how to remove the snap:
- Backup your bookmarks, extensions, and settings, if you care. For me, this happened automatically because I was signed in to Firefox Sync.
- Remove the snap.
sudo snap remove --purge firefox(Using
--purgewill remove the app data, which is probably what you want since the apt package stores its data in a different location.)
- You might want to clean up after the snap version a little more –
rm -r ~/snap/firefox.
Install Firefox from Self-Contained Zip
One non-snap method of installing Firefox is to use Mozilla’s binaries. Mozilla
provides a version of Firefox
that can run on most Linux distributions simply by unzipping it. You can use
this to install Firefox outside Ubuntu’s package manager (using neither snap nor
apt-get). As such, Firefox should be able to update itself like it does on
Windows. Detailed instructions for this method can be found in this Firefox
You’ll unzip Firefox to
/opt, install a symlink in
/usr/local/bin, and add a
.desktop file for your desktop environment.
Install Firefox with apt
Installing Firefox from apt can also work well – Firefox will continue working
and updating as it always has for you in the past. This is easy to do on Ubuntu
21.10, but 22.04 removed the
.deb from the repositories so you’ll need to add
Update: As of Ubuntu 22.04, Firefox is no longer available as a .deb
package in the official repositories. To install Firefox as a .deb with apt in
22.04+, you'll first need to add the Mozilla Team PPA:
To install Firefox from apt, just run
sudo apt update && sudo apt install
firefox after ensuring you’ve added the PPA.
If you need more detailed instructions for this method, see these OMG! Ubuntu! instructions.
It’s a little unfortunate that snap is the default installation method for Firefox in Ubuntu when there are still problems that make it difficult to use as a daily driver (though I’m sure there are many people who are hard at work making the experience better). It’s unclear (to me) at this point if the snap version of Firefox will be the default in 22.04 LTS, but I hope the default experience is better than it is today, whether that’s with the snap version or some other approach. (And thank you to everyone working on these problems.) In the mean time, I hope my notes above are helpful if you’re currently experiencing problems with Firefox and need it to be more stable today.