What files can be easily deleted to save disk space?

To remove files and directories type:

rm file         Removes 'file' provided you have write permission on it. 
rm -f file      Removes 'file' if you have write permission in the directory containing it. 
rmdir dir       Removes the empty directory 'dir'. 
rm -rf dir      Recursively remove dir including every file and subdirectory. Use with caution.

Some applications leave behind files that may be removed without adversely affecting the program.

  • Web browser cache files can be removed. You can clear your browser disk cache, as well as instruct the browser to set aside less disk space to use for its cache, in the program's Preference window, usually under 'Advanced'.

  • PostScript, .aux, and .log files produced by LaTeX can be recreated as necessary from the corresponding .tex file.

  • Compiled object files, often with the suffix .o, produced by C, C++, or Fortran compilers, can usually be deleted. If need be, they can be recreated from the original programs that produced them.

  • Compilers tend to create lots of big binary files such as '.o' and '.out' files. '.out' files in particular can be quite large. If you have such files which have been unused for several days and which you don't intend to use for several more days, they should be removed. (They can easily be recreated if you need them; see "help learn_fortran" for more discussion.) The size of '.out' files which you do need can be reduced somewhat by stripping them. Type:

    strip a.out     Strips an already existing 'a.out'. 
    f77 -s ...      Creates a pre-stripped '.out' file when using f77. 
    cc -s ...       Similarly for cc.

    When programs crash, they sometimes report "Core dumped" indicating that a large file called "core" has been created in the program's current working directory. A user may put the command 'limit coredumpsize 0' at the bottom of ~/.cshrc file to prevent the creation of these core files.