I noticed all docs and all man pages were missing in R31.0.1. If you want those back, then edit:
Comment out the part you don’t want to be excluded:
# Drop all man pages #path-exclude=/usr/share/man/* # Drop all documentation ... #path-exclude=/usr/share/doc/*
Then run “sudo apt update”.
After that you have to do a reinstall of the particular package in order to get the man pages. Some packages have a separate “-docs” package, but most don’t. Example, “ls” is from package “coreutils”. You can find this with “which ls”, leading to “/bin/ls”, then “dpkg -S /bin/ls” leads to the owning package “coreutils”. Reinstall example:
sudo apt-get install --reinstall coreutils
After this anything installed via coreutils has a man page, e.g., you can now “man ls”.
Some packages people will be interested in:
sudo apt-get install --reinstall coreutils sudo apt-get install --reinstall man-db sudo apt-get install --reinstall apt sudo apt-get install --reinstall dpkg sudo apt-get install --reinstall bash sudo apt-get install --reinstall sudo sudo apt-get install --reinstall systemd-sysv sudo apt-get install --reinstall systemd sudo apt-get install --reinstall openssh-client --reinstall openssh-server
Despite some of those looking scary/risky, these work. You can run “sha1sum -c /etc/nv_tegra_release” before/after any of those and see things are still correctly in place.
The longer documents in “/usr/share/doc/” might be of use to people, and reinstalling the base doc will not put longer docs in “/usr/share/doc/” (there might be some sort of notice, but not for example a 200 page PDF). You can see what docs are available:
apt search '\-doc'
If you “sudo apt-get install tree”, then this will be a good demo of what is there:
You’ll notice that in that file listed at the top for edits that there are lines which keep any sort of copyright notice and change notice, so you’ll have those regardless. If you were to reinstall the doc package itself after making the edits to that config file, then you could end up with more docs for that particular topic. You won’t get those docs simply by editing the file.
For an embedded system shipped for production to an end customer you probably wouldn’t want any man pages or docs. On the other hand, if you are a developer, it is rather difficult to live without man pages when exploring something new. The “-doc” packages depend on the package and won’t be as “generally” useful, but the config change won’t put those in…the config edit will simply allow putting those docs in. You can also customize what is included or not since the path-exclude in that file works with as many as you want and with glob style wild cards.