Как удалить snapd в Ubuntu Server

Как удалить snapd в Ubuntu Server

Вступление

В последних версиях Ubuntu Server устанавливается альтернативный менеджер пакетов snap, который далеко не все используют. В данной статье пойдет речь о том, как можно удалить сервис snapd сразу после установки.

Статья писалась и проверялась на Ubuntu Server 20.04.4

Удаляем snapd

Первым делом смотрим какие пакеты установлены с помощью команды, в моем случае на сервере с Ubuntu Server 20.04.4 данная команда выдает вот такой список:

snap list
Name    Version   Rev    Tracking       Publisher   Notes
core20  20220114  1328   latest/stable  canonical✓  base
lxd     4.0.8     21835  4.0/stable/…   canonical✓  -
snapd   2.54.3    14978  latest/stable  canonical✓  snapd

Начинаем удалять пакеты:

sudo snap remove lxd
lxd removed
sudo snap remove core20
core20 removed

Далее нам нужно получить Mount On путь для snapd, делаем это следующей командой:

df | grep snapd
/dev/loop2 44672 44672 0 100% /snap/snapd/14978

Делаем umount:

sudo umount /snap/snapd/14978
В версии ubuntu server 20.10 можно воспользоваться следующей командой:

sudo umount /var/snap

А теперь полностью удаляем snapd

sudo apt purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
squashfs-tools
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 147 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 71981 files and directories currently installed.)
Removing snapd (2.54.3+20.04.1ubuntu0.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
(Reading database ... 71896 files and directories currently installed.)
Purging configuration files for snapd (2.54.3+20.04.1ubuntu0.2) ...
Stopping snap-snapd-14978.mount
Stopping unit snap-snapd-14978.mount
Waiting until unit snap-snapd-14978.mount is stopped [attempt 1]
snap-snapd-14978.mount is stopped.
Removing snap snapd and revision 14978
Removing snap-snapd-14978.mount
Discarding preserved snap namespaces
Final directory cleanup
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
Была ли эта статья Вам полезна?

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Напоминаем Вам, что Ваше сообщение будет опубликовано только после проверки администратором сайта. Обычно это занимает 1-2 рабочих дня.