본문 바로가기

리눅스

[리눅스] 우분투에서 스냅(snap)을 비활성화하는 방법

728x90

우분투에서 스냅(snap)을 비활성화하는 방법

요구사항(requirements)

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

스냅(snap) 비활성화

sudo systemctl disable snapd.service
$ systemctl disable snapd.service
Removed /etc/systemd/system/multi-user.target.wants/snapd.service.
sudo systemctl disable snapd.socket
$ systemctl disable snapd.socket
Removed /etc/systemd/system/sockets.target.wants/snapd.socket.
sudo systemctl disable snapd.seeded.service
$ systemctl disable snapd.seeded.service
Removed /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service.
Removed /etc/systemd/system/multi-user.target.wants/snapd.seeded.service.

스냅(snap) 패키지 제거

sudo snap list
$ snap list
Name    Version        Rev    Tracking       Publisher   Notes
core20  20220826       1623   latest/stable  canonical✓  base
lxd     5.0.1-9dcf35b  23541  5.0/stable/…   canonical✓  -
snapd   2.57.4         17336  latest/stable  canonical✓  snapd
sudo snap remove core20
$ snap remove core20
core20 removed

스냅(snap) 중지

sudo systemctl stop snapd.socket snapd.service

스냅(snap) 제거

dpkg -l snap
$ dpkg -l snap
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  snap           <none>       <none>       (no description available)
sudo apt autoremove --purge snapd
$ apt autoremove --purge snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  snapd* squashfs-tools* ubuntu-server-minimal*
0 upgraded, 0 newly installed, 3 to remove and 43 not upgraded.
After this operation, 95.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109460 files and directories currently installed.)
Removing ubuntu-server-minimal (1.481) ...
Removing snapd (2.56.2+22.04ubuntu1) ...
Removing squashfs-tools (1:4.5-3build1) ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
Processing triggers for man-db (2.10.2-1) ...
(Reading database ... 109360 files and directories currently installed.)
Purging configuration files for snapd (2.56.2+22.04ubuntu1) ...
Discarding preserved snap namespaces
Final directory cleanup
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
sudo rm -rf /var/cache/snapd/
rm -rf ~/snap

 

참고URL

- snap package 사용 방법 : https://scbyun.com/714

 

728x90