79 lines
2.4 KiB
Bash
Executable File
79 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Find Real Space Usage
|
|
# The snapshot is a ghost - find what's actually using space
|
|
|
|
set -e
|
|
|
|
echo "=== Find Real Space Usage ==="
|
|
echo ""
|
|
echo "Your container is 99.8% full (493.4GB used, 995MB free)"
|
|
echo "The snapshot is a ghost entry (0GB)."
|
|
echo "Let's find what's ACTUALLY using the space..."
|
|
echo ""
|
|
|
|
echo "📊 Container Breakdown:"
|
|
echo " Container Total: 494.4GB"
|
|
echo " Container Used: 493.4GB (99.8%)"
|
|
echo " Container Free: 995MB"
|
|
echo ""
|
|
|
|
echo "🔍 Large Directories in /System/Volumes/Data:"
|
|
sudo du -h -d 1 /System/Volumes/Data 2>/dev/null | sort -hr | head -10 | awk '{printf " %8s %s\n", $1, $2}'
|
|
echo ""
|
|
|
|
# Check the suspicious Volumes directory
|
|
VOLUMES_SIZE=$(sudo du -sh /System/Volumes/Data/Volumes 2>/dev/null | awk '{print $1}')
|
|
echo "⚠️ CRITICAL FINDING:"
|
|
echo " /System/Volumes/Data/Volumes: $VOLUMES_SIZE"
|
|
echo ""
|
|
echo " This directory is HUGE and likely contains:"
|
|
echo " - Old Time Machine backup volumes"
|
|
echo " - Mounted disk images"
|
|
echo " - Stale mount points"
|
|
echo ""
|
|
|
|
echo "🔍 Checking what's in /System/Volumes/Data/Volumes:"
|
|
ls -la /System/Volumes/Data/Volumes/ 2>/dev/null | head -20 | sed 's/^/ /'
|
|
echo ""
|
|
|
|
# Check for old backup volumes
|
|
echo "📦 Checking for old Time Machine backup volumes:"
|
|
BACKUP_VOLS=$(ls -d "/System/Volumes/Data/Volumes/Backups of"* 2>/dev/null || echo "")
|
|
if [ -n "$BACKUP_VOLS" ]; then
|
|
echo " Found old backup volumes:"
|
|
echo "$BACKUP_VOLS" | while read vol; do
|
|
SIZE=$(sudo du -sh "$vol" 2>/dev/null | awk '{print $1}')
|
|
echo " - $vol ($SIZE)"
|
|
done
|
|
echo ""
|
|
echo " ⚠️ These are likely old Time Machine backups taking up space!"
|
|
else
|
|
echo " No obvious backup volumes found"
|
|
fi
|
|
echo ""
|
|
|
|
# Check home directory
|
|
echo "📁 Your Home Directory:"
|
|
du -h -d 1 ~ 2>/dev/null | sort -hr | head -10 | awk '{printf " %8s %s\n", $1, $2}'
|
|
echo ""
|
|
|
|
# Summary
|
|
echo "=== Summary ==="
|
|
echo ""
|
|
echo "The snapshot is NOT the problem (it's a ghost, 0GB)."
|
|
echo ""
|
|
echo "The REAL problem:"
|
|
echo " - Container is 99.8% full"
|
|
echo " - /System/Volumes/Data/Volumes is $VOLUMES_SIZE (likely old backups)"
|
|
echo " - Your home: 130GB"
|
|
echo ""
|
|
echo "To free space, you need to:"
|
|
echo " 1. Check what's in /System/Volumes/Data/Volumes"
|
|
echo " 2. Remove old backup volumes if found"
|
|
echo " 3. Clean up your home directory:"
|
|
echo " - Downloads: 8.7GB"
|
|
echo " - Documents: 40GB"
|
|
echo " - Library: 33GB"
|
|
echo ""
|