Skip to content

Instantly share code, notes, and snippets.

@tekumara
Last active February 22, 2026 06:23
Show Gist options
  • Select an option

  • Save tekumara/7ed8678fb7a4f4684072dcd66b178f12 to your computer and use it in GitHub Desktop.

Select an option

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="$HOME/Library/Application Support/com.apple.wallpaper/aerials/videos"
# 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 | tee "$file"
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment