Score:0

Tens of file systems from `$ df -hT`: is it ok?

tr flag

I was trying to follow this link to check if my system needs a defrag, and I found out this. Is it ok?

$ df -hT
File system    Type      Dim. Used Available Use% Mounted on
udev           devtmpfs  7.6G     0    7.6G   0% /dev
tmpfs          tmpfs     1.6G  156M    1.4G  10% /run
/dev/nvme0n1p3 ext4      933G  582G    303G  66% /
tmpfs          tmpfs     7.7G  285M    7.4G   4% /dev/shm
tmpfs          tmpfs     5.0M  4.0K    5.0M   1% /run/lock
tmpfs          tmpfs     7.7G     0    7.7G   0% /sys/fs/cgroup
/dev/loop0     squashfs  768K  768K       0 100% /snap/amazon-webapp/3
/dev/loop1     squashfs  128K  128K       0 100% /snap/bare/5
/dev/loop2     squashfs   11M   11M       0 100% /snap/auto-cpufreq/124
/dev/loop4     squashfs  117M  117M       0 100% /snap/core/14946
/dev/loop6     squashfs  128K  128K       0 100% /snap/cpufreq/1
/dev/loop7     squashfs  117M  117M       0 100% /snap/core/14784
/dev/loop8     squashfs   56M   56M       0 100% /snap/cups/872
/dev/loop12    squashfs   56M   56M       0 100% /snap/cups/836
/dev/loop20    squashfs   97M   97M       0 100% /snap/discord/153
/dev/loop19    squashfs  6.5M  6.5M       0 100% /snap/curl/1679
/dev/loop17    squashfs   98M   98M       0 100% /snap/discord/151
/dev/loop21    squashfs  165M  165M       0 100% /snap/gnome-3-28-1804/194
/dev/loop22    squashfs  165M  165M       0 100% /snap/gnome-3-28-1804/198
/dev/loop23    squashfs  219M  219M       0 100% /snap/gnome-3-34-1804/93
/dev/loop24    squashfs  219M  219M       0 100% /snap/gnome-3-34-1804/90
/dev/loop25    squashfs  350M  350M       0 100% /snap/gnome-3-38-2004/137
/dev/loop26    squashfs  350M  350M       0 100% /snap/gnome-3-38-2004/140
/dev/loop29    squashfs  2.7M  2.7M       0 100% /snap/gnome-system-monitor/178
/dev/loop31    squashfs  1.5M  1.5M       0 100% /snap/gnome-system-monitor/181
/dev/loop30    squashfs  256K  256K       0 100% /snap/gtk2-common-themes/13
/dev/loop32    squashfs   82M   82M       0 100% /snap/gtk-common-themes/1534
/dev/loop33    squashfs   92M   92M       0 100% /snap/gtk-common-themes/1535
/dev/loop36    squashfs  981M  981M       0 100% /snap/intellij-idea-community/430
/dev/loop35    squashfs  437M  437M       0 100% /snap/kde-frameworks-5-96-qt-5-15-5-core20/7
/dev/loop40    squashfs  438M  438M       0 100% /snap/kde-frameworks-5-99-qt-5-15-7-core20/15
/dev/loop38    squashfs  425M  425M       0 100% /snap/kde-frameworks-5-qt-5-15-3-core20/8
/dev/loop39    squashfs  438M  438M       0 100% /snap/kde-frameworks-5-98-qt-5-15-6-core20/9
/dev/loop44    squashfs   85M   85M       0 100% /snap/netflix-viewer/18
/dev/loop45    squashfs   70M   70M       0 100% /snap/overleaf/4
/dev/loop46    squashfs   65M   65M       0 100% /snap/prospect-mail/16
/dev/loop49    squashfs  112M  112M       0 100% /snap/shutter/27
/dev/loop50    squashfs  606M  606M       0 100% /snap/pycharm-community/329
/dev/loop52    squashfs  158M  158M       0 100% /snap/spotify/64
/dev/loop53    squashfs   82M   82M       0 100% /snap/prospect-mail/22
/dev/loop55    squashfs  207M  207M       0 100% /snap/ubuntu-app-platform/34
/dev/loop57    squashfs  296M  296M       0 100% /snap/vlc/2344
/dev/loop56    squashfs  321M  321M       0 100% /snap/vlc/3078
/dev/nvme0n1p1 vfat      786M   82M    705M  11% /boot/efi
tmpfs          tmpfs     1.6G  256K    1.6G   1% /run/user/1001
/dev/loop58    squashfs   64M   64M       0 100% /snap/core20/1879
/dev/loop16    squashfs  461M  461M       0 100% /snap/gnome-42-2204/102
/dev/loop59    squashfs  449M  449M       0 100% /snap/kf5-5-105-qt-5-15-9-core22/9
/dev/loop41    squashfs   56M   56M       0 100% /snap/core18/2745
/dev/loop60    squashfs   74M   74M       0 100% /snap/core22/634
/dev/loop14    squashfs  360M  360M       0 100% /snap/kdenlive/87
/dev/loop15    squashfs  606M  606M       0 100% /snap/pycharm-community/332
/dev/loop42    squashfs  981M  981M       0 100% /snap/intellij-idea-community/434
/dev/loop34    squashfs  151M  151M       0 100% /snap/chromium/2477
/dev/loop11    squashfs   64M   64M       0 100% /snap/whatsapp-for-linux/56
/dev/loop51    squashfs   64M   64M       0 100% /snap/core20/1891
/dev/loop61    squashfs  141M  141M       0 100% /snap/skype/277
/dev/loop48    squashfs  158M  158M       0 100% /snap/spotify/67
/dev/loop54    squashfs   11M   11M       0 100% /snap/auto-cpufreq/129
/dev/loop3     squashfs  360M  360M       0 100% /snap/kdenlive/89
/dev/loop62    squashfs  449M  449M       0 100% /snap/kf5-5-105-qt-5-15-9-core22/11
/dev/loop27    squashfs   91M   91M       0 100% /snap/whatsapp-for-linux/57
/dev/loop43    squashfs   56M   56M       0 100% /snap/core18/2751
/dev/loop63    squashfs  438M  438M       0 100% /snap/kde-frameworks-5-99-qt-5-15-7-core20/7
/dev/loop37    squashfs  6.5M  6.5M       0 100% /snap/curl/1754
/dev/loop18    squashfs   74M   74M       0 100% /snap/core22/750
/dev/loop9     squashfs  143M  143M       0 100% /snap/skype/280
/dev/loop13    squashfs  461M  461M       0 100% /snap/gnome-42-2204/105
/dev/loop28    squashfs  151M  151M       0 100% /snap/chromium/2497
Marco avatar
br flag
Linux filesystems do not need defragmentation. Only btrfs has the option, but you don't use btrfs.
hr flag
Yes it's OK - see [Why are all snaps being mounted and listed as block devices or partitions for Ubuntu 18.04?](https://askubuntu.com/questions/1047456/why-are-all-snaps-being-mounted-and-listed-as-block-devices-or-partitions-for-ub)
Score:0
ca flag

$ lsblk -ape7 -o+LABEL,FSSIZE,FSUSE% gives you a shorter list of actual disks and partitions with size and used%.

The majority of your list is installed "snap" packages... (including old and disabled)

To somewhat cleanse the snap packages... place this text in a file...

B="$(tput rev)"
R="$(tput sgr 0)"
echo -e "\n${B}Snap updates? Current content/list:${R}"
if [ ! -z "$( which snap)" ] ;then
  snap list --all
  echo -e "\n... list of available updates?"
  snap refresh --list | sed -re 's/\x1B.*\[K//'
  echo -e "\nsnap refresh # doing the actual update."
  sudo snap refresh
  echo -e "\nsnap remove # on 'disabled' items..."
  # https://askubuntu.com/a/1040131/289138
  snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
        sudo snap remove "$snapname" --revision="$revision"
    done
else
  echo -e "'snap' not present."
fi

... then do $ source file

WARNING: excerpt from my update script... untested in this format.

Py-ser avatar
tr flag
Thanks. What's the warning about? Can I run the script or not?
Hannu avatar
ca flag
It should work, but it is "Untested".
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.