Installation of man/mandb for man-pages


It would be very nice if you could install mandb from the gate. Since it is not installed from the start, and if one installs it manually even after performing a mandb -c to create/update pages almost all, if not all are still unable to man program. This is I believe due to the fact when installing all the different programs since mandb is not install they do not create associated man page directories. Please take the below for an example.

osmc@WhatDudeBox:~$ dpkg -S timedatectl
systemd: /usr/share/bash-completion/completions/timedatectl
systemd: /usr/bin/timedatectl
systemd: /usr/share/man/man1/timedatectl.1.gz
systemd: /usr/share/zsh/vendor-completions/_timedatectl
osmc@WhatDudeBox:~$ man timedatectl
No manual entry for timedatectl
See ‘man 7 undocumented’ for help when manual pages are not available.
osmc@WhatDudeBox:~$ ls -lh /usr/share/man/man1/timedatectl.1.gz
ls: cannot access /usr/share/man/man1/timedatectl.1.gz: No such file or directory

This forces us to perform the below to get them.
sudo apt-get install --reinstall pkg

So to get all packages man pages (if they have them) do the following:
sudo dpkg --get-selections | grep -v deinstall | awk ‘{print $1}’ > list.log
for i in $(cat list.log); do sudo apt-get install --reinstall “$i”; done

1 Like

Currently we don’t include them to save space. You can find man pages online in this day and age. This might change in the future one day.


I’d like to echo the request for man pages to be installed. I’ve downloaded the build environment, and the necessary changes to have man pages installed amount to ~3 lines of code being changed in 2 files – I’d be happy to provide if needed…

I’ve pulled down git repository, and I’ve built my own OSMC, that DOES have the man pages installed (my changes make man-db and manpages the FIRST 2 deb packages that are installed after debootstrap when building the filesystem)…I’ve had absolutely NO issue with lack of space, or other issues with the system.

In this day in age, man pages consuming < 50 MiB of space on a 4 GiB flash drive amounts to a mere 1.25% of the space. This number goes down as one uses a 8 GiB, 16 GiB, 32 GiB flash drives, etc. The point is, the argument that you need to nuke the man pages to save space is no longer valid.

Thank you for OSMC. I think having the man pages installed would make it even better!


1 Like

On NOOBS we just get over 1GB of space to use (before system installation)
With thumbnails, APT archives and userdata this gets very tight.


I’m looking at the latest ‘raspbian lite’ image (uncompressed, it is 1.7 GiB)…The man pages only take 17 MiB of that space. You’re not saving MUCH by removing /usr/share/man…

Unfortunately while we only have limited space via NOOBS, we will keep the man-pages out.
Every bit of space saved matters.

While I understand that space isn’t a concern for your specific setup, there are many NOOBS users for whom it will be a problem.



Would you be open to reconsidering if I could find, say 50-60 MiB of OTHER unused / unneeded packages / files ELSEWHERE in OSMC that could be removed INSTEAD of /usr/share/man?

I know I just signed up for this forum yesterday, and I certainly don’t intend any disrespect, etc…Given that OSMC development dates back ~10 years, removing arbitrary directories (and providing no ‘easy’ way to get them back) seemed to me to be a ‘dated’ way of obtain space.


If you can shave 60MB off the root filesystem, you’ll make a lot of people happy. Some may have problems though. 99.9% of our users will never need manpages. Those that do consult online manpages.

Removing other packages could lead to this very same post requesting us reinstating something that a user believes should be included. This is slightly ironic.

If you have a proposal to make them installable on demand or want to package them up then we can accept a PR.

The OSMC project was only founded just over three years ago
First stable release was just two years ago.


I stand corrected… I saw your blog post “Saying ‘good bye’ to Apple TV” that said ‘For almost ten years, we’ve been supporting the 1st generation AppleTV…’ and (I know I should never) assumed that you were referring ot OSMC…


I wish I had more time to try help regarding this matter. Would contacting NOOB to maybe alter there formatting scheme help to pull weight on this? I’ve only setup a few OSMC boxes mostly for family as I’ve always run RetroPie w/ Kodi installed to stream. But wanted a dedicated Pi instead of using my handmade game boy with the case open for this. I, unfortunately, don’t have the time/knowledge at this time to review how they’re made like you did yourself eyeDoc2020 made your own. But 1GB seems ridiculously small. I mean 16GB card costs ~$10 from Microcenter, leaving us with such a small space is kinda dumb in 2017.

We set the partition size for rootfs in NOOBS.

But we have to be considerate and keep in mind that users will install other distributions.

It may be time to revisit as the default NOOBs card has increased in size.

Here’s, more or less, how I did it…

  1. Installed Virtual Box on my 64-bit Windows 10 Pro box.

  2. Created & installed Debian Jessie x64 in a Virtual Box machine. I think I allocated 32GB disk space for the system. I went ‘old-school’ and didn’t install ANY desktop environment, only added sshd.

  3. Logged into the Debian Jessie box.

  4. Followed the directions on the OSMC wiki to replicate the osmc git repository:

$ sudo apt-get update
$ sudo apt-get install build-essential git
$ git clone GitHub - osmc/osmc: OSMC (Open Source Media Center) is a free and open source media center distribution
$ cd osmc

  1. Building an Raspberry Pi image of OSMC that one can “dd” onto a flash card is done in 2 steps. The first step is to build the filesystem tarball. The second step is to copy that tarball to the installer directory and have it create the OSMC image…

  2. Changes to add / prevent man pages from being removed…

  • edit scripts/ On my version, I REMOVED line 125, which says:

rm -rf ${1}/usr/share/man/*

  • edit osmc/filesystem/osmc-rbp2-filesystem/ On my version, line 69 says:

echo -e “Installing core packages”

I inserted the following 2 lines starting on line 70:

chroot ${DIR} apt-get -y install --no-install-recommends man-db manpages

  1. Build the filesystem:

$ cd filesystem/osmc-rbp2-filesystem
$ make

This will produce osmc-rbp2-filesystem-<currentdate>.tar.xz that is used in the next step to create the image you’ll dd to your flash drive…

  1. Build the image:

$cd …/…/installer/target
$cp …/…/filesystem/osmc-rbp2-filesystem/osmc-rbp2-filesystem-<currentdate>.tar.xz ./filesystem.tar.xz
$ make

  1. This will take a while (my system took ~45 minutes), and will produce the OSMC image in the ./buildroot-2014.05/output/images directory. Simply use the OSMC_TGT_rbp2_<currentdate>.img.gz file to create the SD card for your device.

That got me a working card with all man pages in tact, so I moved forward with USING the pi device.

Granted there may be 10 people who CARE about this, but it does more closely mirror a debian release with man pages installed…Just my $0.02…

In order to preserve space on NOOBS, the code to remove the man-db, manpages packages, as well as remove /usr/share/man could be moved to the installer/noobs part of the build system?

Thank very much for the steps eyeDoc2020! I’ll have to get this a shot sometime soon after my LPIC certs.

One small issue…On the resulting image that is built, it doesn’t appear EVERYTHING worked…

On boot, I am getting the following message:

Failed to start Disk Manager (legacy version).
See ‘systemctl status udisks.service’ for details

A quick google search leads me to believe that my build has parts of the system “out of sync”, and none of the suggested “recipes” to fix this appears to be working on the resulting build…

Is this an easy fix that I can’t find, or did I do something wrong in my build steps?

Edit: Never mind. I fixed this by changing /etc/apt/sources.list to use jessie-devel, did a apt update; apt dist-upgrade; and it appears to have fixed the issue (after, I changes /etc/apt/sources.list to use jessie again)…

Perhaps for the devices with larger default storage, the man pages could be installed. I know this would require multiple images for the same product line, but after that, it’s just Debian-style updates, which means if you have the man pages already, you’ll get updated ones, and if you don’t, you won’t.

Either that, or on the OOB setup for OSMC, you could add a step to optionally install the man pages using the “apt-get install --reinstall” method. It could run in the background, and by the time the user gets to an SSH login, they would be there.

That is a great idea. However, the way that the OSMC filesystem is created, there is a “clean-up” function that removes “unnecessary” files before creating the tar file that the installer uses to create an OSMC installation image. Anyway, after the filesystem is built, the man pages for all the currently installed DEB packages are arbitrarily eradicated using the “rm -rf /usr/share/man/*” command. Thus, there is no easy way to get them back (short of reinstalling all DEBs that contain man pages).

@sam_nazarko if the man pages are removed using a simple rm -rf then could there not be a dummy package made available which simply downloaded a tar.gz file of the contents of that directory for the default packages and put them back in the appropriate place?

That would allow a one line installation for those who want them and still maintain the space for those who do not. It would be much easier than reinstalling every .deb to get manpages back.

It would have to install man itself as well.

man can be installed by the user anyway with a simple apt-get, the issue is getting the pages that are removed back without having to reinstall every package.