Clean up / filesystem

Robert Huff roberthuff at rcn.com
Sat Oct 9 19:15:26 UTC 2010


Caleb Stein writes:

>  >>  I'm constantly getting the message, ":/ write failed, filesystem
>  >>  is full", so I did df, and it said that my / filesystem was at
>  >>  108%.  What files can I delete to free some space?
>  >
>  > 	Start by checking the contents of /tmp.
>  > 	Any *.core in /root you don't recognize is suspect.
>  > 	After that?  Try:
>  >
>  > 	du -x / | sort -n -r | head -n 40
>  >
>  > 	Look in those directories.
>  
>  So is it safe to do "rm -rf /tmp/*"?

	No.  Blanket deletes are almost never a good idea.
	_Look in the directories_.
	Understand what's there, and why.
	Do so regularly, and you'll get a feel for when something
changes.  The output of:

	du /usr | sort -n -r | head -n 30

	is waiting for me every morning when I check e-mail.  After
about a month, I knew what directories should be there (the exact
content fluctuates, depending on port builds etc.) and how big they
should be, and could a) pick out when something was wrong and b)
guess what might have caused it.


				Robert Huff

	


More information about the freebsd-questions mailing list