如何禁用 Filelight 显示 /snap/ 目录?

如何禁用 Filelight 显示 /snap/ 目录?

/snap/即使在“设置”>“配置 Filelight”>“扫描”选项卡>“不扫描这些文件夹:”列表中排除了许多目录,运行 Filelight 也会显示许多目录。此排除不会阻止/snap/Filelight 运行时显示 18 个驱动器。然后,当 Filelight 运行时,/snap/会显示许多目录并使 Filelight 窗口变得混乱。

在此处插入“不扫描这些文件夹:”列表的屏幕截图。

在此输入图像描述

通过 CLI 运行 Filelight:

:~$ filelight
Found the following remote filesystems:  ()
Found the following local filesystems:  ("/run/", "/run/lock/", "/snap/gnome-3-34-1804/77/", "/snap/gnome-3-34-1804/72/", "/snap/core18/2284/", "/snap/kde-frameworks-5-qt-5-14-core18/4/", "/snap/gtk-common-themes/1515/", "/snap/snapd/14978/", "/snap/core18/2344/", "/snap/gnome-3-28-1804/161/", "/snap/gnome-3-38-2004/99/", "/snap/bare/5/", "/boot/efi/", "/snap/gnome-3-38-2004/87/", "/snap/snap-store/558/", "/snap/snapd/15177/", "/snap/core20/1376/", "/snap/core20/1361/", "/snap/gtk-common-themes/1519/", "/snap/gnome-3-28-1804/145/", "/snap/snap-store/547/", "/run/user/119/", "/run/user/1000/", "/media/me/f167466e-2b5b-4d01-a0d3-1cc860105aba/", "/media/me/C0A8D308A8D2FBBA/", "/run/user/1000/keybase/kbfs/", "/run/snapd/ns/") 

/snap//snap/core18/2284/都在不扫描的目录列表中,但仍然可以被 Filelight 找到。

在此处插入/snap/显示目录的 Filelight 窗口的屏幕截图。

在此输入图像描述

该图像只是填充 Filelight 窗口的示例;向下滚动会显示许多其他 /snap/* 目录,即使它们被排除在“设置”>“配置 Filelight”>“扫描”选项卡>“不扫描这些文件夹:”列表中。

一些快照信息:

:~$ snap list
Name                             Version                     Rev    Tracking       Publisher   Notes
bare                             1.0                         5      latest/stable  canonical✓  base
core18                           20220309                    2344   latest/stable  canonical✓  base
core20                           20220304                    1376   latest/stable  canonical✓  base
gnome-3-28-1804                  3.28.0-19-g98f9e67.98f9e67  161    latest/stable  canonical✓  -
gnome-3-34-1804                  0+git.3556cb3               77     latest/stable  canonical✓  -
gnome-3-38-2004                  0+git.1f9014a               99     latest/stable  canonical✓  -
gtk-common-themes                0.1-59-g7bca6ae             1519   latest/stable  canonical✓  -
kde-frameworks-5-qt-5-14-core18  5.68.0                      4      latest/stable  kde✓        -
snap-store                       3.38.0-66-gbd5b8f7          558    latest/stable  canonical✓  -
snapd                            2.54.4                      15177  latest/stable  canonical✓  snapd
:~$ df -t squashfs
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/loop2        224256 224256         0 100% /snap/gnome-3-34-1804/77
/dev/loop4        224256 224256         0 100% /snap/gnome-3-34-1804/72
/dev/loop3         56960  56960         0 100% /snap/core18/2284
/dev/loop5        297600 297600         0 100% /snap/kde-frameworks-5-qt-5-14-core18/4
/dev/loop8         66688  66688         0 100% /snap/gtk-common-themes/1515
/dev/loop9         44672  44672         0 100% /snap/snapd/14978
/dev/loop7         56960  56960         0 100% /snap/core18/2344
/dev/loop10       168832 168832         0 100% /snap/gnome-3-28-1804/161
/dev/loop11       254848 254848         0 100% /snap/gnome-3-38-2004/99
/dev/loop12          128    128         0 100% /snap/bare/5
/dev/loop19       253952 253952         0 100% /snap/gnome-3-38-2004/87
/dev/loop20        55552  55552         0 100% /snap/snap-store/558
/dev/loop21        44800  44800         0 100% /snap/snapd/15177
/dev/loop23        63488  63488         0 100% /snap/core20/1376
/dev/loop24        63488  63488         0 100% /snap/core20/1361
/dev/loop25        66816  66816         0 100% /snap/gtk-common-themes/1519
/dev/loop26       166784 166784         0 100% /snap/gnome-3-28-1804/145
/dev/loop27        52224  52224         0 100% /snap/snap-store/547
:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.8G     0  3.8G   0% /dev
tmpfs           782M  1.9M  780M   1% /run
/dev/sdb5        36G   31G  3.6G  90% /
tmpfs           3.9G   11M  3.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop2      219M  219M     0 100% /snap/gnome-3-34-1804/77
/dev/loop4      219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop3       56M   56M     0 100% /snap/core18/2284
/dev/loop5      291M  291M     0 100% /snap/kde-frameworks-5-qt-5-14-core18/4
/dev/loop8       66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop9       44M   44M     0 100% /snap/snapd/14978
/dev/loop7       56M   56M     0 100% /snap/core18/2344
/dev/loop10     165M  165M     0 100% /snap/gnome-3-28-1804/161
/dev/loop11     249M  249M     0 100% /snap/gnome-3-38-2004/99
/dev/loop12     128K  128K     0 100% /snap/bare/5
/dev/sdb1        96M   30M   67M  32% /boot/efi
/dev/loop19     248M  248M     0 100% /snap/gnome-3-38-2004/87
/dev/loop20      55M   55M     0 100% /snap/snap-store/558
/dev/loop21      44M   44M     0 100% /snap/snapd/15177
/dev/loop23      62M   62M     0 100% /snap/core20/1376
/dev/loop24      62M   62M     0 100% /snap/core20/1361
/dev/loop25      66M   66M     0 100% /snap/gtk-common-themes/1519
/dev/loop26     163M  163M     0 100% /snap/gnome-3-28-1804/145
/dev/loop27      51M   51M     0 100% /snap/snap-store/547
tmpfs           782M     0  782M   0% /run/user/119
tmpfs           782M   28K  782M   1% /run/user/1000
/dev/sda1       916G   80G  790G  10% /media/me/f167466e-2b5b-4d01-a0d3-1cc860105aba
/dev/sdb3        70G   64G  6.6G  91% /media/me/C0A8D308A8D2FBBA
/dev/fuse       250G  1.4G  249G   1% /run/user/1000/keybase/kbfs

我的发行版信息:

:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

我的系统信息:

:~$ uname -a
Linux me-G3-3779 5.4.0-105-generic #119~18.04.1-Ubuntu SMP Tue Mar 8 11:21:24 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

参考线程: 如何禁用显示快照应用程序的文件灯?

答案1

解决方案是运行df -t squashfs以​​查看安装了哪些快照文件。然后一一删除卡扣并通过 apt 安装应用程序。

sudo snap remove gimp
sudo add-apt-repository ppa:ubuntuhandbook1/gimp
sudo apt update
sudo apt install gimp

不过,如果不需要的话,并不是所有东西都被替换了。 sudo snap remove android-file-transfer-linux

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee 
/etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo snap remove brave
sudo apt install brave-browser

我已经用 apt 安装了 vlc,所以我只需删除 vlc snap。 sudo snap remove vlc

我从不使用 Wire,所以我就把它删除了。 sudo snap remove wire

sudo snap remove telegram-desktop 
sudo add-apt-repository ppa:atareao/telegram
sudo apt-get install telegram

df -h df -t squashfs snap list 所有显示都没有安装用户空间应用程序。

filelight当在这一点上跑步时,看起来好多了,也不那么拥挤了。

运行df -t squashfs然后卸载每个以查看会发生什么,因为我不知道。

sudo umount /snap/gnome-3-34-1804/77
sudo umount /snap/gnome-3-34-1804/72
sudo umount /snap/core18/2284
sudo umount /snap/kde-frameworks-5-qt-5-14-core18/4
sudo umount /snap/gtk-common-themes/1515
sudo umount /snap/snapd/14978
sudo umount /snap/core18/2344
sudo umount /snap/gnome-3-28-1804/161
sudo umount /snap/gnome-3-38-2004/99
sudo umount /snap/bare/5
sudo umount /snap/gnome-3-38-2004/87
sudo umount /snap/snap-store/558
sudo umount /snap/snapd/15177
sudo umount /snap/core20/1376
sudo umount /snap/core20/1361
sudo umount /snap/gtk-common-themes/1519
sudo umount /snap/gnome-3-28-1804/145
sudo umount /snap/snap-store/547

这表明不再安装任何快照南瓜。 df -t squashfs

完全删除并仔细检查,

sudo apt purge snapd
snap list
df -t squashfs
df -h
rm -rf ~/snap
sudo rm -rf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd

然后我通过手动搜索来寻找落后者, sudo updatedb && locate snap > snap.txt

然后停止未来的安装 sudo apt-mark hold snapd

Filelight 现在看起来好多了。Filelight 不仅运行起来没有杂乱,还解决了在无法合并插件和脚本的隔离区域运行某些快照(如 gimp)的问题。我还释放了大约 10 GB 的空间。

相关内容