![var - snap(19.10)上的磁盘空间不足](https://linux22.com/image/925673/var%20-%20snap%EF%BC%8819.10%EF%BC%89%E4%B8%8A%E7%9A%84%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E4%B8%8D%E8%B6%B3.png)
我在 var 中遇到了空间问题。原因是 snap 文件,所以我尝试了一些方法来删除它们,但问题仍然相同。我尝试执行文件,但它对我来说不起作用 -https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html. 找到一种方法,用一行代码将其删除:
snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then snap remove "$snapname" --revision="$rev"; fi; done
这会删除一些旧的 snap 版本,但问题仍然存在:
kunca@kunca:/var/lib/snapd/snaps$ ls -l
total 1802740
-rw------- 1 root root 30306304 фев 6 18:14 chromium-ffmpeg_15.snap
-rw------- 1 root root 149807104 май 16 10:51 code_33.snap
-rw------- 1 root root 57618432 май 16 10:49 core18_1754.snap
-rw------- 1 root root 98484224 май 16 10:49 core_9066.snap
-rw------- 1 root root 184406016 май 22 09:27 gimp_273.snap
-rw------- 1 root root 167931904 фев 6 19:48 gnome-3-28-1804_116.snap
-rw------- 1 root root 267980800 май 16 10:53 gnome-3-34-1804_33.snap
-rw------- 1 root root 2555904 май 16 10:50 gnome-calculator_748.snap
-rw------- 1 root root 282624 май 16 10:50 gnome-characters_539.snap
-rw------- 1 root root 978944 май 16 10:50 gnome-logs_100.snap
-rw------- 1 root root 135168 фев 7 00:50 gtk2-common-themes_9.snap
-rw------- 1 root root 65105920 май 16 10:50 gtk-common-themes_1506.snap
-rw------- 1 root root 273375232 май 16 10:54 kde-frameworks-5-core18_32.snap
-rw------- 1 root root 147828736 май 26 14:41 opera-developer_100.snap
drwxr-xr-x 2 root root 4096 авг 30 2019 partial
-rw------- 1 root root 119734272 май 22 09:27 signal-desktop_321.snap
-rw------- 1 root root 72372224 май 25 18:37 telegram-desktop_1634.snap
-rw------- 1 root root 207060992 фев 6 17:36 viber-mtd_17.snap
kunca@kunca:/var/lib/snapd/snaps$