aboutsummaryrefslogtreecommitdiff
path: root/docs/distros
diff options
context:
space:
mode:
authorIridiumNan <2930416610@qq.com>2026-07-28 15:12:28 +0000
committerGitHub <noreply@github.com>2026-07-28 15:12:28 +0000
commit802e9482d560c1c6fd4e3a871202786f2c230a94 (patch)
tree53de1c03818eabc32d1fcfe2dd45b3e91b2a9973 /docs/distros
parentMerge branch 'LinuxCabin:main' into main (diff)
parentMerge branch 'main' of https://github.com/LinuxCabin/linux-handbook (diff)
Merge branch 'LinuxCabin:main' into main
Diffstat (limited to 'docs/distros')
-rw-r--r--docs/distros/debian/ubuntu.md32
-rw-r--r--docs/distros/rhel/fedora.md4
2 files changed, 34 insertions, 2 deletions
diff --git a/docs/distros/debian/ubuntu.md b/docs/distros/debian/ubuntu.md
index 0d8748f..d992b13 100644
--- a/docs/distros/debian/ubuntu.md
+++ b/docs/distros/debian/ubuntu.md
@@ -102,4 +102,36 @@ Ubuntu是当今最受认可的Linux发行版,也是中国国家操作系统基
- USTC: https://mirrors.ustc.edu.cn/debiancn/
- MirrorZ: https://mirrors.cernet.edu.cn/debiancn/
+### 移除Snap
+Snap是Canonical推出的Linux通用包管理工具。与Flatpak相同,采用沙箱化设计来保证软件极其依赖的正常运行。
+
+不过,由于Canonical的商业操作,使用apt安装部分软件会被Snap劫持,同时由于Snap本身的性能优化不足,因而其被部分社区用户唾弃,Linux Mint也剔除了Snap。
+
+Snap的移除步骤十分繁琐。首先,你必须按照顺序(先应用,后依赖)卸载所有Snap应用:
+```bash
+snap list # 列出Snap应用
+sudo snap remove --purge firefox #逐个卸载
+...
+sudo snap remove --purge core20 core24
+```
+
+之后,卸载Snapd并清除残余目录:
+```bash
+sudo apt purge snapd
+sudo apt autoremove
+sudo rm -rf ~/snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd /snap
+# 若部分目录不存在,删掉即可
+```
+
+最后还需要阻止其重装。您需要编辑`/etc/apt/preferences.d/nosnap.pref`,并写入:
+```bash
+Package: snapd
+Pin: release a=*
+Pin-Priority: -10
+```
+或者运行`sudo apt-mark hold snapd`。
+
+最后,更新软件包列表: `sudo apt update`
+
+**请注意,经过系统大版本更新等操作,Snap仍然有恢复的可能。** \ No newline at end of file
diff --git a/docs/distros/rhel/fedora.md b/docs/distros/rhel/fedora.md
index 5e41d39..d8d02fc 100644
--- a/docs/distros/rhel/fedora.md
+++ b/docs/distros/rhel/fedora.md
@@ -86,8 +86,8 @@ Fedora由于版权限制,无法内置H264/H265编解码器,因此需要手åŠ
### Fedora Flatpak仓库
若您发现自己的KDE Discover、GNOME 应用 一直在转圈加载,又或是安装Flatpak时一直在查找匹配项,那么可能是Fedora的官方Flatpak源在拖后腿。
-n
-要解决这个问题,您可以在终端中运行`sudo flatpak remote-delete fedora`。
+
+要解决这个问题,您可以在终端中运行如下指令:`sudo flatpak remote-delete fedora`。
!!! warning "针对不可变发行版"
Fedora的不可变版本中,有部分系统应用的来源为Fedora官方Flatpak仓库。所以,我们建议您在提示移除源会删除软件时,记录好将要删除软件的包名。在删除后,您可以通过官方Flathub仓库重新安装。