Usually use Mac air, disk space is small, often prompt disk space is almost full, of course, you can use Disk Cleanup tool cleanup, but manually clean up disk space is also very convenient, execute the following command:
1. Clean the Trash: Unused files usually deleted are automatically put into the trash, if not cleaned up in time, will still occupy disk space, so need to clean the trash in time
2. Clean up the noise file: sudo rm-f/system/library/speech/voices/*
3. Delete System log: sudo rm-rf/private/var/log/*
4. Clean up the Quicklook cache file: sudo rm-rf/private/var/folders/
5. Delete temporary files: rm-rf/private/var/tmp/tm*
6. Clean up the cache file: Rm-rf ~/library/caches/*
The above 6 methods are a more secure way to clean up, and you can also choose whether to clean up the following:
1. Disable sleep mode: This configuration is not recommended if you consider data security saving, because after disabling hibernation mode, if the notebook suddenly has no power, it cannot be saved automatically, only the last time you saved the changes manually.
sudo pmset-a hibernatemode 0--Disable hibernate mode
sudo rm-f/private/var/vm/sleepimage--delete hibernation file
Touch Sleepimage--Making a hibernation file
chmod 000/private/var/vm/sleepimage----Set Hibernate file permissions: no permission to modify
2. If you do not use Emacs to do the file editor, you can also delete this tool, Emacs is a very useful file editor, if you often use Python,php,ruby and other scripting language, not recommended to delete.
sudo rm-rf/usr/share/emacs/
Several methods of Mac Disk Cleanup