Skip to content

Instantly share code, notes, and snippets.

@tjerkw
Created February 25, 2022 17:47
Show Gist options
  • Save tjerkw/be8f094d9b1fc7920170e961548b87d0 to your computer and use it in GitHub Desktop.
Save tjerkw/be8f094d9b1fc7920170e961548b87d0 to your computer and use it in GitHub Desktop.
# Disable dumping complete memory to disk for sleeping, saves lots of diskspace at the cost of not having sleepmode
sudo pmset -a hibernatemodhisto
sudo rm -fr /private/var/vm/sleepimage
sudo touch /private/var/vm/sleepimage
sudo chmod 000 /private/var/vm/sleepimage
sudo rm -rf /System/Library/Speech//Voices/*
sudo rm -rf /private/var/log/*
sudo rm -rf /private/var/folders/
rm -rf /private/var/tmp/TM*
sudo rm -fr /private/var/tmp/kernel_panics
rm -rf ~/Library/Caches/*
@tjerkw
Copy link
Author

tjerkw commented Feb 25, 2022

Deletes lots of caches and big files on your MacOS harddrive that you need to install XCode because you bought a cheap macbook with limited storage and already hitting the disk-full error :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment