Skip to content

Instantly share code, notes, and snippets.

@tekumara
Created November 2, 2025 01:05
Show Gist options
  • Save tekumara/7ed8678fb7a4f4684072dcd66b178f12 to your computer and use it in GitHub Desktop.
Save tekumara/7ed8678fb7a4f4684072dcd66b178f12 to your computer and use it in GitHub Desktop.
Truncate downloaded macOS dynamic wallpapers to save disk space (20G) and avoid them being downloaded again
#!/bin/bash
# Truncate downloaded macOS dynamic wallpapers to save disk space (20G) and avoid them being downloaded again
TARGET_DIR="/Library/Application Support/com.apple.idleassetsd/Customer/4KSDR240FPS"
# Check if directory exists
if [ ! -d "$TARGET_DIR" ]; then
echo "Error: Directory '$TARGET_DIR' does not exist."
exit 1
fi
# Find and replace all .mov files with 0-byte files
find "$TARGET_DIR" -type f -name "*.mov" -print0 | while IFS= read -r -d '' file; do
echo "Truncating $file"
echo -n | sudo tee "$file"
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment