Can't install anything using snap install command after manually umonted loop device

I was learning about block devices, mount, umount and all sorts of these related things. And I stumbled upon this article.

What is a Loop device in Linux? (itsfoss.com)

From the article above, I learnd that software that is installed by snap is just a file mounted as loop device. And also the same articke demonstrates that you can use umonut command to unmount the loop device which disable the umantend snap package.

With the knowledge I learned from the article, I wanted to try the concept.

First, I have successfully installed “btop” command which is a system monitoring tool. And btop command worked as expected. It is just a softwared installed by snap command.

Then, I tried umounting the loop device which is cretaed after I installed btop command. After this peration, btop command was unabled to be executed as I expected which is fine.

The article also shows how you can delete loop device using losetup command. And the deletion was successful.

But the problem is after doing these above operation, I’m no longer able to install anything using snap command. I tried to install htop command and hello-world but both of them cannot be installed.

Everytime the same errors↓

The error of installing hello-world:

$ sudo snap install hello-world
error: cannot perform the following tasks:
- Mount snap "core" (14946) (systemctl command [reload-or-restart snap-core-14946.mount] failed with exit status 1: Job failed. See "journalctl -xe" for details.
)

The error of installing htop:

$ sudo snap install htop
error: cannot perform the following tasks:
- Mount snap "htop" (3654) (systemctl command [reload-or-restart snap-htop-3654.mount] failed with exit status 1: Job failed. See "journalctl -xe" for details.
)

The error of installing btop:

$ sudo snap install btop
error: cannot perform the following tasks:
- Mount snap "btop" (598) (systemctl command [reload-or-restart snap-btop-598.mount] failed with exit status 1: Job failed. See "journalctl -xe" for details.
)

I put other information below:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
$ snap version
snap    2.59.2
snapd   2.59.2
series  16
ubuntu  20.04
kernel  5.15.0-67-generic

Now I feel I made a bad decision since I just followed the article and do what it says blindly but I have no idea how do I fix this. I need to restore snap to be able to use install again.

I appreciate if anybody gives me any kind of guidance.

I fixed the problem by simply uninstall snap itself and reinstall it gain. After reinstalling, snap can be used to install packages.

==How to Uninstall snap==

How to uninstall snap? - Ask Ubuntu

==How to install snap again==

Installing snap on Ubuntu | Snapcraft documentation