Created
October 3, 2013 11:59
-
-
Save estahn/6808707 to your computer and use it in GitHub Desktop.
Free up disk space by deleting older Google Chrome versions
This file contains 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 | |
current=`find /Applications/Google\ Chrome.app/Contents/Versions -maxdepth 1 -type d -name "*.*.*.*" | sort | tail -1 | xargs -I% basename %` | |
echo Deleting old Chrome versions and keep $current | |
find /Applications/Google\ Chrome.app/Contents/Versions -maxdepth 1 -type d -name "*.*.*.*" -not -iname "$current" -exec rm -rf {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment