Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to maintain 2gb on the root installation of ubuntu. The home is in another partition. I am thinking to delete the /usr/share/doc to free some space, but is it safe?

share|improve this question
up vote 1 down vote accepted

Short answer, No with a 'but'; it's always best to allow the built-in packaging system (APT) to manage files that it has installed. If you just delete these files, they'll probably reappear the next time you upgrade any of the affected packages, unexpectedly evaporating your space savings. Instead, use Software Center (or apt-get or aptitude) to remove the packages themselves. Usually they have the same name as the folder you see in /usr/share/doc, but if there's a folder that you can't figure out, try dpkg -S /path/to/file.

For example, after reading your question, I ran ncdu /usr/share/doc and found it was 1.7G, and most of the heavy hitters were related to texlive, which I only installed to check something for another AskUbuntu question. I ran aptitude, searched for packages matching ^texlive.*doc$, and purged them, and now it's down under 930M.

share|improve this answer

My /doc/ directory is very small, less than 50 MB, and I imagine yours isn't quite that large (in comparison) either.

Instead, see this post on how to free up disk space in many different ways. Lots of good suggestions there, but please keep in mind that some of those offer no way to 'back out' if something goes wrong.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.