Mike Kasberg

Husband. Father. Software engineer. Ubuntu Linux user.

Image for How to Fix Firefox Crashes on Ubuntu 21.10+

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 .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):

  • 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 .deb version.
  • 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 localhost in the URL bar doesn’t work without http:// explicitly prepended.
  • 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 Firefox. 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.

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, 3D printing, tech, and other random topics.

Share!

Sharing my blog posts is a great way to support me and help my blog grow!

I run this blog in my spare time, without any ads. There's no need to pay to access any of the content on this site, but if you find my content useful and would like to show your support, this is a small gesture to let me know what you like and encourage me to write more great content!