Image for

How to Fix Firefox Crashes on Ubuntu 21.10+

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 .deb package. 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.

New releases of Firefox are only available through snap

Here are some of the problems currently plaguing the snap version of Firefox (as of March, 2022):

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:

  1. Backup your bookmarks, extensions, and settings, if you care. For me, this happened automatically because I was signed in to Firefox Sync.
  2. Remove the snap. sudo snap remove --purge firefox (Using --purge will remove the app data, which is probably what you want since the apt package stores its data in a different location.)
  3. 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 help article. 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 a PPA.

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: sudo add-apt-repository ppa:mozillateam/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.

Share!

Did you like this blog post? Why not share it with your network!

About the Author

Mike Kasberg

👋 Hi, I'm Mike! I'm a husband, I'm a father, and I'm a senior software engineer at Strava. I use Ubuntu Linux daily at work and at home. And I enjoy writing about Linux, open source, programming, tech, and other random topics.