Created
November 2, 2025 01:05
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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