Skip to content

Instantly share code, notes, and snippets.

@kaishin kaishin/clean.sh
Created Apr 11, 2015

Embed
What would you like to do?
#! /bin/sh
var1=`sudo du -sh /Users/$USER/Library/Logs`
var2=`sudo du -sh /Library/Caches`
var3=`sudo du -sh /Users/$USER/Library/Caches`
var4=`sudo du -sh /var/folders/*`
var5=`sudo du -sh /System/Library/Caches`
var7=`sudo du -sh /Users/$USER/Library/Safari/Downloads.plist`
var8=`sudo du -sh /Library/Logs`
sudo rm -rf /Library/Logs
sudo rm -rf /Users/$USER/Library/Logs
sudo rm -rf /Library/Caches
sudo rm -rf /Users/$USER/Library/Caches
sudo rm -rf /var/folders/*
sudo rm -rf /System/Library/Caches
sudo rm /Users/$USER/Library/Safari/Downloads.plist
echo "You can save:"
echo $var1
echo $var2
echo $var3
echo $var4
echo $var5
echo $var7
echo $var8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.