87 lines
2.6 KiB
Bash
Executable File
87 lines
2.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Explain Why Moving Files Doesn't Free Space
|
|
|
|
set -e
|
|
|
|
echo "=== Why Moving Files Doesn't Free Space ==="
|
|
echo ""
|
|
echo "⚠️ THE PROBLEM:"
|
|
echo ""
|
|
echo "When you move/delete files, the OS update snapshot preserves them."
|
|
echo "This means:"
|
|
echo " - Files are moved to NAS ✅"
|
|
echo " - But space isn't freed on Mac ❌"
|
|
echo " - System Data grows instead 📈"
|
|
echo ""
|
|
|
|
FREE_SPACE=$(df / | tail -1 | awk '{print $4}')
|
|
FREE_SPACE_GB=$(echo "scale=2; $FREE_SPACE / 1024 / 1024" | bc)
|
|
echo "Current free space: ${FREE_SPACE_GB}GB"
|
|
echo ""
|
|
|
|
echo "📸 The OS Update Snapshot:"
|
|
SNAPSHOT=$(diskutil apfs listSnapshots / 2>/dev/null | grep "Name:" | head -1)
|
|
if [ -n "$SNAPSHOT" ]; then
|
|
echo "$SNAPSHOT" | sed 's/^/ /'
|
|
echo ""
|
|
echo " This snapshot:"
|
|
echo " - Is NOT purgeable"
|
|
echo " - Preserves all deleted/moved files"
|
|
echo " - Can't be deleted manually"
|
|
echo " - Will only clear when you update macOS"
|
|
fi
|
|
echo ""
|
|
|
|
echo "🔍 What's Happening:"
|
|
echo ""
|
|
echo "1. You move files → Files go to NAS ✅"
|
|
echo "2. macOS snapshot preserves them → System Data grows 📈"
|
|
echo "3. Space isn't freed → Still full ❌"
|
|
echo ""
|
|
|
|
echo "=== THE ONLY SOLUTION ==="
|
|
echo ""
|
|
echo "You MUST install the macOS update to clear the snapshot."
|
|
echo ""
|
|
echo "But you need space to install the update (17.64GB needed)."
|
|
echo ""
|
|
echo "This is a catch-22 situation:"
|
|
echo " - Need space to update"
|
|
echo " - Can't get space because snapshot preserves deleted files"
|
|
echo ""
|
|
|
|
echo "=== WORKAROUND ==="
|
|
echo ""
|
|
echo "Option 1: Free space from sources that DON'T trigger snapshots:"
|
|
echo " - Clean caches: rm -rf ~/Library/Caches/* (~6GB)"
|
|
echo " - Clean user cache: rm -rf ~/.cache/* (~3GB)"
|
|
echo " - Clean npm: npm cache clean --force (~1GB)"
|
|
echo " Total: ~10GB (still not enough for 17.64GB update)"
|
|
echo ""
|
|
|
|
echo "Option 2: Try downloading update with less space:"
|
|
echo " sudo softwareupdate --download --all"
|
|
echo " (Sometimes works with less than required space)"
|
|
echo ""
|
|
|
|
echo "Option 3: Use external drive temporarily:"
|
|
echo " - Move files to external drive (not NAS)"
|
|
echo " - Install update"
|
|
echo " - Move files back after snapshot clears"
|
|
echo ""
|
|
|
|
echo "Option 4: Contact Apple Support:"
|
|
echo " They may have tools to force-clear the snapshot"
|
|
echo ""
|
|
|
|
echo "=== Current Status ==="
|
|
echo ""
|
|
echo "Files moved to NAS: ✅ (they're safe)"
|
|
echo "Space freed on Mac: ❌ (snapshot preserving them)"
|
|
echo "System Data: 📈 (growing because of snapshot)"
|
|
echo ""
|
|
echo "The files ARE moved, but the space won't be freed"
|
|
echo "until the snapshot is cleared by updating macOS."
|
|
echo ""
|