While trying to install any snap from snap store you might get some error or the snaps are not loading.
When you try to install them from terminal you get this error

sudo: snap: command not found
cause of problem
This might be a problem caused by some broken packages or some missing packages. This usually occur after software update. So here’s how to fix this.
How to fix
Open terminal manually or by pressing Ctrl + Alt + t
Note: if this gives “sudo: command not found” error, then fix it using this command.
Step 1
Type and enter your superuser password
sudo apt-get update --fix-missing
Hit:1 https://brave-browser-apt-release.s3.brave.com stable InRelease Hit:2 http://archive.ubuntu.com/ubuntu hirsute InRelease Hit:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease Hit:5 http://archive.ubuntu.com/ubuntu hirsute-security InRelease Reading package lists... Done
If it gives dpkg error then use
sudo dpkg --configure -a
Step 2
After checking missing packages install snapd without this you can’t install snaps with ‘sudo snap’ .
sudo apt install snapd
Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed snapd 0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade. Need to get 21.0 MB of archives. After this operation, 95.4 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu hirsute/main amd64 snapd amd64 2.49.2+21.04ubuntu1 [21.0 MB] Fetched 21.0 MB in 9s (2,459 kB/s) Selecting previously unselected package snapd. (Reading database ... 330001 files and directories currently installed.) Preparing to unpack .../snapd_2.49.2+21.04ubuntu1_amd64.deb ... Unpacking snapd (2.49.2+21.04ubuntu1) ... Setting up snapd (2.49.2+21.04ubuntu1) ... Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.servi ce → /lib/systemd/system/snapd.apparmor.service. Created symlink /etc/systemd/system/multi-user.target.wants/snapd.autoimport.ser vice → /lib/systemd/system/snapd.autoimport.service. Created symlink /etc/systemd/system/multi-user.target.wants/snapd.core-fixup.ser vice → /lib/systemd/system/snapd.core-fixup.service. Created symlink /etc/systemd/system/multi-user.target.wants/snapd.recovery-choos er-trigger.service → /lib/systemd/system/snapd.recovery-chooser-trigger.service. Created symlink /etc/systemd/system/multi-user.target.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service. Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.servi ce → /lib/systemd/system/snapd.seeded.service. Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /lib /systemd/system/snapd.service. Created symlink /etc/systemd/system/timers.target.wants/snapd.snap-repair.timer → /lib/systemd/system/snapd.snap-repair.timer. Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /lib/sys temd/system/snapd.socket. Created symlink /etc/systemd/system/final.target.wants/snapd.system-shutdown.ser vice → /lib/systemd/system/snapd.system-shutdown.service. snapd.failure.service is a disabled or a static unit, not starting it. snapd.snap-repair.service is a disabled or a static unit, not starting it. Processing triggers for desktop-file-utils (0.26-1ubuntu1) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for dbus (1.12.20-1ubuntu3) ... Processing triggers for mailcap (3.68ubuntu1) ... Processing triggers for bamfdaemon (0.5.5+21.04.20210119-0ubuntu1) ...
Step 3
After installing snapd try to install the snap which was giving no snap error
sudo snap install telegram-desktop
Setup snap "snapd" (12398) security profiles / 2021-07-16T05:25:30+05:30 INFO Waiting for automatic snapd restart... telegram-desktop 2.8.4-2-gc22d7ffcf from Telegram FZ-LLC (telegram.desktop) installed
Error fixed!
Problem with snapd
A lot of times snapd works in background and use your bandwidth or too much cpu which may result in unstable internet-connection or unstable ping. Here’s how to fix it.
Your snapd is taking a lot of data and CPU in background? Here is how to fix it.
2 thoughts on “How to fix sudo: snap: command not found and snap store not working in Linux”