16

I was installing some programs, and every program has a XXX-doc package. I suppose it's for documentation, maybe even for man pages? Because I get a documentation online, thus in that case may I remove all -doc packages? I only need basic man pages, not the whole documentation, so what they really should consist of?

E.g: vim-doc consist only from .html files (checked using dpkg), so man page isn't there I think, so what's the use of doc package?

Is it safe to: sudo apt-get purge (or remove) .*-doc?

2
  • Why? I doubt you will save tremendous space by doing so. Admittedly most of the documentation and it's location is fairly obscure.
    – haziz
    Dec 25, 2019 at 13:18
  • @haziz texlive docs are 2.5 GB, mostly PDFs that have never been opened.
    – qwr
    May 10, 2022 at 7:02

1 Answer 1

16

As you noticed, doc packages are not for basic man/info pages. They contain extended documentation, usually in the form of HTML pages. So Generally it's be safe to remove any installed doc packages. just make sure you don't over-remove packages, which is especially easy with *. Additionally regex is somewhat difficult from apt-get, it does not seem to use the standard POSIX/Extended POSIX style. I would actually do something like this.

dpkg -l | awk ' { print $2 } ' | grep '\-doc$'

If you approve of that list displayed, you can then attempt to purge them like this,

sudo apt-get purge `dpkg -l | awk ' { print $2 } ' | grep '\-doc$'`
3
  • It's a bit confusing though; extended documentation is often in packages not called -doc, and if I recall a few -doc packages do contain man pages. Aug 18, 2012 at 23:50
  • Unfortunately consistency is not always 100%, regarding community created software/packages. Obviously this has dramatically improved over the years. I did consider the possibility, which is why I could only speak '... Generally ...'. Additionally I did emphasize the importance of review. Aug 19, 2012 at 15:47
  • The documentation maintained by the Ubuntu documentation team is in ubuntu-docs or depending on your flavor (x)(k) etc...
    – jjesse
    Nov 3, 2012 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .