Man pages are the UNIX traditional way of distributing documentation about programs. The term "man page" itself is short for "manual page", as they correspond to the pages of the printed manual; the man pages "sections" (1 for commands, 2 for system calls, etc.) correspond to sections in the full UNIX manual. Support is still there if you want to print a man page to paper, although this is rarely done these days, and the sheer number of man pages make it just impossible to bind them all into a single book.
In the early '90s, the GNU project decided that "man" documentation system was outdated, and wrote the info command to replace it: info has basic hyperlinking features and a simpler markup language to use (compared to the "troff" system used for man pages). In addition, GNU advocates against the use of man pages at all and contends that complex software systems should have complete and comprehensive documentation rather than just a set of short man pages.
There are actually other documentation systems in use, besides man and info: GNOME and KDE have their own, HTML-based system, etc.
In the end, the form in which you get documentation depends on the internal policies of the project that provided the software in the first place -- there is no globally accepted standard.
According to the Ubuntu wiki, you can instruct dpkg
not to install any documentation. This should prevent any documentation (except copyright info) from being installed by apt.
Create a file /etc/dpkg/dpkg.cfg.d/01_nodoc
which specifies the
desired filters. Example:
path-exclude /usr/share/doc/*
# we need to keep copyright files for legal reasons
path-include /usr/share/doc/*/copyright
# if you also want to remove the man pages uncomment the next line
#path-exclude /usr/share/man/*
path-exclude /usr/share/groff/*
path-exclude /usr/share/info/*
# lintian stuff is small, but really unnecessary
path-exclude /usr/share/lintian/*
path-exclude /usr/share/linda/*
Then you can manually remove any documentation already installed:
find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
find /usr/share/doc -empty|xargs rmdir || true
rm -rf /usr/share/groff/* /usr/share/info/*
rm -rf /usr/share/lintian/* /usr/share/linda/* /var/cache/man/*
If you also want to remove the man pages do:
rm -rf /usr/share/man/*
The example is written for OEMs, but it worked just as well for me. Took my /usr/share/doc/
directory down from ~150MB to ~20MB.
Best Answer