Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
Help ! My Hard drive shrinks !
Sometimes, users who heavily use their computers may notice that the available disk space on their boot hard drive ( the startup volume ) may change slightly, even if they didn't add any files or applications.
This FAQ explains why and how to solve this minor issue.
I - A small glossary
Log files : Mac OS X and many applications use text files called logs. These files list the different tasks performed by a software and the errors that may have occurred. Such records are often used during troubleshooting or by developers.Cache files : Mac OS X and many applications - web browsers, for example - use cache files. These files contain information that is very often used by an application - images, system status... By making this information easily accessible, these files help speed up the software. For example, instead of downloading 10 times the same image, a browser will download it once and put it in the "cache". Then, it will just have to look into the cache folder to display it the 9 other times...
II - What happens ?
Mac OS X and most applications automatically take care of these files and delete or compress them when they are not needed any more. As long as log files or cache files may "grow" very quickly, automatic maintenance scripts make sure that no unnecessary files are stored on your hard drive.
For example, Mac OS X runs scripts early in the morning at 3, 4 or 5 AM when the computer is in use or when you install an application. Your web browser clears the cache when you quit the application or click on the "Clear cache" button.
III - So, where is the glitch ?
Under some circumstances, cache or log files aren't cleared or compressed as they should be. In that case, they can grow in size and you may see changes in the available hard drive space - usually a few KB...
This may happen when :
- Mac OS X is unable to run the maintenance scripts
- You have deleted an application that didn't have the time to take care of its own files
- You use a third-party software that "forgets" to perform the necessary steps
IV - What am I supposed to do ?
Here are a few steps that should take care of most files :
- Quit all your applications and restart the computer
This will delete some "temporary" files that are stored on your hard drive and, by quitting all applications, should force them to delete cache files.- Make sure that some applications aren't set up to save log files or to create very detailed logs.
Some applications, especially internet-related ones, may allow you to save every log file or to write very detailed ones with every single action performed. While this may be useful, it is also space-consuming and should be avoided when possible without risk.- Open the Terminal - located in your "Utilities" folder - and type the following commands (1) :
- sudo periodic daily
- sudo periodic weekly
- sudo periodic monthly
Then, restart your computer.These commands will run the maintenance scripts that should normally be launched automatically by Mac OS X. While they run, do not use your computer. These commands don't display messages on the screen. Wait for the prompt to re-appear in the Terminal window. It is a good idea to disconnect your computer from any network ( local or not ) while you run these scripts. Of course, as an added security, you should backup your data before using them.
V - Will this correct other problems ?
These steps will help you to clear cache and log files but will not correct file system problems, for example. Therefore, they will not solve errors or instability issues.
I hope that this FAQ will help you to better understand the cache and log files system. Would you have any additional questions, please, do not hesitate to post on the forum : we will all be very glad to help you !
Note : these commands will work with Mac OS X 10.2.x. Mac OS X 10.1 users - or Mac OS 10.2 users wanting to see detailed feedback - should enter the commands this way : "sudo sh /etc/monthly"
Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.
Replies