Select Page

Introduction

In a Linux machine, there are countless ways you can install a specific application. One, you can install an application using a distribution’s package manager. Two, by compiling that program from its source code using build tools. And three, use a third party software to install it. There are many third party services that package those applications for you to install, which both has its good and bad sides. 

The good side is that the programs which are packed in these services can be installed on any Linux distribution that supports that third-party packaging format. Which means, you can install a specific program like Firefox using the same command in any Linux distribution. If you had used the package manager instead, this would have differed as different distros use their own package managers, just to to seem cool actually, making the user more frustrated than be happy…

To fulfill our actual concern here, which is to eradicate the “failed to load snappy daemon” error message, we need to understand a few fundamentals, so as to be clear about the issue and troubleshoot it without adding up more errors in the process.

And one more thing. Don’t get to much into thinking about the difference between snap and snappy daemon. They both are the same. The terminal spells it snappy, but for us humans it’s just easier to stick to saying snap as that’s the actual thing anyway. Don’t worry if this sounds weird. Anyways, moving on.


What is snap daemon?

The snap daemon, also called snapd, is a process that runs in the background, and is initialized when the system starts. It can also be referred to as a third-party package management system which is an alternative to the package manager of your distribution. It is a necessary process that needs to be run for snaps to work in your Linux machines. So what’s a snap in the first place? A snap is actually a format for an Linux application that is bundled along with its dependencies into one single package. This makes it easier to ship the package between multiple distributions at once, where the snap packages are supported.

In order to run these bundled packages (snaps), you need to have the snapd daemon running as a background process. Snaps are not the only form of third-party package management available in Linux however. We have other services like Flatpak, as well as the option of Linux Appimages, which are also quite similar in terms of their motto. 


Why did snap daemon fail to start?

This is where it all gets interesting. This problem is more specific to Debian based distributions like Ubuntu and Lubuntu, which are actually the two main distros mentioned by users to have shown the error message during startup. There have been reports of a single boot taking more than 30 minutes, due to the snapd.service not being able to start. So why is this?

The origin of the problem appears to be from the fact that newer versions of Ubuntu and Lubuntu, have the snapd package in their bootable ISO installed by default. Also, there are programs like FireFox which are installed as a snap package instead of a system-native package in those ISOs. If the snap daemon had failed to load, then once you’re inside the ISO, you’d not be able to run the packages that are installed as snaps either, because the daemon needs to be running before you can. 

The exact reason as to why this error occurs is quite tangled up, but there have been mentions from the developers of Snapd that this is due to some sort of kernel regression and lack of entropy thingy. Also, this could possibly be happening if you’re booting the ISO from a Virtual machine, without enough resources allocated to it. If the booting itself is slow, then the snap daemon would not start up, creating a chain of further problems. It should’ve been fixed by now, but there are still occurrences of these messages, so let’s get down to some error fixing business.


How to fix ‘failed to start snappy daemon’ error

Press Ctrl + C to skip snap daemon

There are several fixes to this issue, but it’s not certain which one would work in your case. But the first fix that some people have gotten through is by pressing Ctrl + C on their keyboard when they see the error message during startup. This is supposed to skip the starting of the snap daemon. However, this will only fix your problem temporarily in case it doesn’t boot at all. To fix it permanently, head to the last fix of this section, “Delete Snapd”.

Upgrade your whole system

If you’ve successfully logged into the system, the first thing you’d want to do is upgrade your entire operating system, which is most probably either Ubuntu or Lubuntu. To do this, run the following commands in your terminal:

$ sudo apt-get update 
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

This will update everything the package manager finds in your system, including snapd if possible. Updating snapd should be a very probable fix as the newer versions were supposed to fix, as mentioned by the developers. If the upgrading does not work, then you’ll have to turn the hard way. Delete snapd.

Delete Snapd

Yes. Indeed it’s a harsh thing to do, but in case there’s no way you’re able to fix the problem, then this is the only path left for you to take. The good news is that most applications are already available in your system’s repository, except for a few certain ones that can also be installed by other means. It does take away the niceness of using snaps, but at least you won’t have to wait for hours every time you boot into your machine, right!


But before you proceed, be sure to understand this first. If you haven’t installed the OS yet, and are getting the message when booting into the Live USB/CD Installation medium, then removing snapd will not do anything good. What you should do instead is first install the OS, and after that, if you see the error during the startup of the actually installed system, then only will removing snapd help you get you way out.


if you’re ready to go, first scan for all the packages that are installed as snaps (this will most certainly also include FireFox, but don’t worry just yet), by executing the following command:

$ snap list

You’ll get a list of package names including their version numbers. Delete every one of these snap packages by running:

$ sudo snap remove --purge <package_name>

Replace <package_name> with the actual names of the packages you see from the previous output. Delete one program at a time. Once you’re done removing all these programs, stop the snapd daemon, and then disable it as a safety precaution so you don’t get an error while trying to remove it:

$ sudo systemctl stop snapd.service 
$ sudo systemctl disable snapd.service

Afterwards, remove the snapd package from your system, by executing:

$ sudo apt purge snapd

This will remove the snapd package as well as the snapd daemon from your system. Besides that, you may also consider removing the snap directory in your system’s home directory, by running:

$ sudo rm -rf ~/snap

Now try restarting your computer to see if it has fixed the problem for you. If you didn’t get any errors while trying to remove snapd, and have successfully done so, then you probably should see it anymore.

New users may have another concern now, which is the fact that firefox will also be removed along with snap. Don’t worry, it’s as simple as just running a command. As soon as you’ve removed snapd, using the apt command now will simply install the system-native version of FireFox. Do this by executing:

$ sudo apt-get install firefox

Conclusion

Wala! You have installed firefox without the error message popping up on your way when booting your machine anymore! If you like using snap, well, you’ll have to see whether updating to a newer version of it fixes the problem for you. If it doesn’t, the choice is yours to be made. Either remove snap and use apt or something else to install and maintain packages, or wait for more than 30 minutes every time you gotta boot into the machine. Hehe.