Resolve Snapd High CPU Consumption

Snapd consuming 100% CPU on fresh boot is the most common issue on Ubuntu 24.04, which causes severe system slowdowns, with about 30% of Ubuntu users experiencing high CPU usage from the Snap daemon. In this guide, you will learn to identify and Fix Snapd 100% CPU Usage on Ubuntu 24.04.

Snapd is Ubuntu’s app installer service for Snap packages, and it can sometimes jump to 100% CPU when your system starts, or even while you’re using it. Users report CPU consumption for about 150 seconds, which can make the whole system feel frozen or extremely slow. To resolve the snapd high CPU usage, follow the steps below provided by the Orcacore team.

Step-by-Step Fix Snapd 100% CPU Usage on Ubuntu 24.04

These fixes are listed from fastest to most thorough. You can try them one by one until your CPU usage returns to normal. Most people fix the problem with the first few steps in under 5 minutes.

Before implementing the fixes to resolve the snapd high CPU usage, check the Snap daemon status with the command below:

sudo systemctl status snapd.service

If the service shows high CPU usage, proceed with the following solutions to Fix Snapd 100% CPU Usage on Ubuntu 24.04.

1. Restart the Snap Daemon

A simple restart usually resolves temporary resource conflicts. Restart the Snapd service with the command below:

sudo systemctl restart snapd.service

This clears stuck processes and resets the service without requiring a full system reboot.

2. Update All Snap Packages

Outdated Snap packages may contain performance bugs that have been fixed in newer versions. You can use the command below to update all installed Snap applications, which can include critical performance improvements:

sudo snap refresh

3. Remove Unused Snap Packages

Too many installed Snaps can slow down your CPU, so removing them can help to reduce CPU usage. First, list everything you have installed with the command below:

sudo snap list

Then, remove unnecessary packages with the command below:

Note: Avoid removing base or core snaps.

sudo snap remove package-name

Each removed Snap reduces boot time and CPU resource usage.

4. Clear Snap Cache

Sometimes old or broken data gets stuck in the Snap cache, which can slow everything down. Clearing this cache is safe and often fixes weird performance issues.

To clear the Snap cache, run the command below:

sudo rm -rf /var/lib/snapd/cache/*

5. Monitor System Resources

You can run system monitoring to identify conflicting processes. For this purpose, you can run the top command:

sudo top

Check if snapd is using too much CPU. Often, this happens because automatic updates are running at the same time as other background tasks, which slows things down.

6. Disable Snap Auto-Updates Temporarily

You can stop the automatic updates that cause high CPU usage. To do this, run the commands below:

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

If you want to make this permanent, you must mask the service with the following command:

sudo systemctl mask snapd.service

Important Warning: This prevents all Snap applications from launching.

Replace Snap with Flatpak: Advanced Solution for Snapd High CPU Usage

If the above fixes don’t resolve the snapd high CPU usage, it is recommended to use an alternative option like Flatpak.

To do this, you must list and remove all Snap packages from your server with the commands below:

snap list
sudo snap remove firefox
sudo snap remove snapd-desktop-integration
sudo snap remove snap-store
sudo snap remove core20
sudo snap remove bare
sudo snap remove snapd

Then, stop and disable the Snapd service with the following commands:

sudo systemctl stop snapd
sudo systemctl disable snapd

Now you must purge and remove snapd completely by using the commands below:

sudo apt purge -y snapd
rm -rf ~/snap
sudo rm -rf /var/cache/snapd

Also, you must prevent automatic snapd reinstallation by creating a preferences file to block snapd. To create the file, use your desired text editor, like Vi editor or Nano editor:

sudo nano /etc/apt/preferences.d/nosnap.pref

Add the following content to the file:

Package: snapd
Pin: release a=*
Pin-Priority: -10

Once you are done, save and close the file.

Now you can install Flatpak as a replacement with the commands below:

For GNOME-based systems:

sudo apt install flatpak gnome-software-plugin-flatpak

For KDE Plasma systems:

sudo apt install flatpak plasma-discover-backend-flatpak

Add the Flathub repository with the command below:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Then, you can install packages via .deb instead of Snap. Since removing Snap deletes the default Firefox browser, you can install it with:

sudo add-apt-repository ppa:mozillateam/ppa
sudo apt install -t 'o=LP-PPA-mozillateam' firefox

For detailed information, you can check this guide on installing Flatpak on Ubuntu 24.04.

Best Practices for Snap Management

If you decide to keep Snap installed, following these best practices will help prevent high CPU usage in the future and keep your system running smoothly.

  • Limit installations to only essential Snap applications.
  • Regularly update packages to receive performance patches.
  • ​Monitor system resources weekly to catch issues early.
  • ​Consider alternatives like .deb or Flatpak for frequently-used applications.
  • ​Perform clean installations rather than upgrades when possible.

FAQ

Is it safe to remove Snap completely?

Yes, it is safe. However, default apps like Firefox and the App Center will be removed, so you will need to reinstall them using other methods.

Why does snapd use so much CPU on startup?

Snapd automatically checks for updates and errors as soon as you log in. On some systems, this process gets stuck and uses all your CPU.

Can I just pause Snap updates instead of removing them?

Yes. You can hold Snap updates until a specific time to prevent them from slowing down your computer right now with: sudo snap set system refresh.hold="$(date --date='tomorrow' +%Y-%m-%dT%H:%M:%S%:z)"

Conclusion

Many Ubuntu 24.04 users face snapd high CPU usage, but fixing it is straightforward. Start with simple steps like restarting the service or clearing the cache. If problems persist and performance is your priority, switching to Flatpak is a faster and more reliable alternative.

Hope you enjoy this guide. Please subscribe to us on FacebookX, and YouTube to get more tutorials.

Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay informed and not overwhelmed, subscribe now!