Disk free space and Snap drives

Disk free space “df” includes Snap virtual drives. Listing actual hard drive partitions is accomplished with “grep”.

Find only Ext4 and FUSE drives:

df -hT | grep -E "ext4|fuseblk"

Exclude “tmpfs” and “snap” virtual drives:

df -hT | grep -vE "squashfs|tmpfs"

As Snap packages update, old versions are left behind. Find Snap packages with multiple versions by examining output of:

df -t squashfs | sort -k6

Suppose /snap/slack/6 and /snap/slack/7 are installed. Remove the old Slack Snap version:

snap remove slack --revision=6

Find drive types:

df -T