I have a problem understanding the disk usage calculation of macOS. My disk-utiliy shows the following usage:
On the shell I get a similar picture
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s7s1 233Gi 8.7Gi 35Gi 20% 356810 365211400 0% /
devfs 197Ki 197Ki 0Bi 100% 682 0 100% /dev
/dev/disk1s2 233Gi 2.0Gi 35Gi 6% 2289 365211400 0% /System/Volumes/Preboot
/dev/disk1s4 233Gi 3.0Gi 35Gi 8% 4 365211400 0% /System/Volumes/VM
/dev/disk1s6 233Gi 21Mi 35Gi 1% 20 365211400 0% /System/Volumes/Update
/dev/disk1s5 233Gi 184Gi 35Gi 85% 932950 365211400 0% /System/Volumes/Data
/dev/disk1s1 233Gi 1.1Mi 35Gi 1% 143 365211400 0% /Volumes/MAC - Daten
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
To get the folders with more then 1 GB space usage I was running: du -ht 1G / 2>/dev/null. Counting space usage of the root and first level folders I get the following picture:
199G /
109G /System
65G /Users
18G /Applications
1,8G /Library
3,1G /usr
2,4G /private
summing up the first level folders gives me ~ 199,3G which suits to the 199G of root.
Taking a deeper dive in the sub folders of the du output, show me some duplicated entries, see example below. Currently I get the impression the system is counting space usage
twice, which would be wrong in my understanding. If I filter out the duplicated entries, my disk usage should be 109G, this is 90G less then stated by disk-utility, 199G.
Is there an error in my reasoning regarding the disk usage (calculation)?
Exmaples:
65G /System/Volumes/Data/Users
65G /System/Volumes/Data/Users/foobar
13G /System/Volumes/Data/Users/foobar/mail
22G /System/Volumes/Data/Users/foobar/Pictures
13G /System/Volumes/Data/Users/foobar/Pictures/2021
6,4G /System/Volumes/Data/Users/foobar/Pictures/2022
2,6G /System/Volumes/Data/Users/foobar/Pictures/2023
compared to:
65G /Users
65G /Users/foobar
13G /Users/foobar/mail
22G /Users/foobar/Pictures
13G /Users/foobar/Pictures/2021
6,4G /Users/foobar/Pictures/2022
2,6G /Users/foobar/Pictures/2023
18G /System/Volumes/Data/Users/foobar/Library
11G /System/Volumes/Data/Users/foobar/Library/Containers
3,9G /System/Volumes/Data/Users/foobar/Library/Caches
compared to:
18G /Users/foobar/Library
11G /Users/foobar/Library/Containers
3,8G /Users/foobar/Library/Caches
2,5G /System/Volumes/Data/usr
2,5G /System/Volumes/Data/usr/local
2,0G /System/Volumes/Data/usr/local/Cellar
compared to:
3,1G /usr
2,5G /usr/local
2,0G /usr/local/Cellar
18G /System/Volumes/Data/Applications
2,0G /System/Volumes/Data/Applications/Docker.app
1,1G /System/Volumes/Data/Applications/Google Chrome.app
1,7G /System/Volumes/Data/Applications/Microsoft Excel.app
2,2G /System/Volumes/Data/Applications/Microsoft Word.app
1,5G /System/Volumes/Data/Applications/Microsoft PowerPoint.app
compared to:
18G /Applications
2,0G /Applications/Docker.app
1,1G /Applications/Google Chrome.app
1,7G /Applications/Microsoft Excel.app
2,2G /Applications/Microsoft Word.app
1,5G /Applications/Microsoft PowerPoint.app
