避免在 Ubuntu 中使用 snap 包

避免在 Ubuntu 中使用 snap 包

Ubuntu(Ubuntu 20.04 LTS)最近因其 snap 包(例如 Chromium)而臭名昭著。它们加载起来很痛苦。这就是我所做的,以阻止他们。有人有更好的想法吗?

sudo rm -rf /var/cache/snapd/
sudo apt autoremove --purge snapd gnome-software-plugin-snap
rm -fr ~/snap

# (OPTIONAL) Following command will make sure snapd does not get installed again as a dependency
# Downside is that you will get an error if you try to install certain packages 
# those come only as snaps
sudo apt-mark hold snapd 

答案1

找到了一些信息https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-04/。整合该帖子和我的实验中的信息,以下是需要完成的操作:

sudo apt purge snapd
rm -vrf ~/snap

# following may not be required as apt purge already removes them
sudo rm -vrf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd

# (OPTIONAL STEP) 
# Trying to install some package like chromium-browser will bring back snapd
# make sure snapd is not installed as a dependency anymore
# downside is that some package installation might fail because of dependecy on snapd
sudo apt-mark hold snapd 

相关内容