Processing triggers for man-db

When running sudo aptitude upgrade, the console freezes for long after almost every package upgrade with a message "Processing triggers for man-db ...". What could be the problem and how can I fix it?

Ubuntu version: 12.04 (both Server and Xubuntu)

Thanks in advance.


Update: It looks like this problem is related to package autofs upon my further tests. Removing autofs resolved the issues. No idea why. I then have to use soft links instead of autofs for my file system to avoid this issue (and other two issues posted here as well).

1

6 Answers

Might be helpful for someone: I ran into this issue on our CI regularly.

Just execute the following:

sudo apt-get remove -y --purge man-db

The command removes the man-db package completely, which in our case on CI, was completely useless anyway.

1

It's possible the mandb index is corrupted.

check the index and recreate it

sudo mandb -t
rm -rf /var/cache/man
sudo mandb -c
4

I had something similar just after installing Ubuntu 18.04 on Windows Subsystem for Linux and running update and upgrade: it got stuck at processing triggers for man-db (2.8.3-2). And also later, after running

sudo apt install python3-pip

My solution: I just waited. In the second case even some 15 minutes. I do not know whether this is normal, as I am very new to Linux. But this so people just know another experience if they run into the same problem.

1

Processing triggers for man-db is I/O bound, and can be painfully slow if you are on a HDD, or Google Cloud's default disk storage tier.

Upgrade your disk

2

I have had the same problem when I was installing apache web server on my digital ocean droplet. After waited a bit, I simply just stop the process and rerun the command. It shows the apache is already installed and it worked. I hope it can still help.

Since I sometimes need the man pages.

And since there doesn't seem to be a stand-alone 'man' package, I can't simply remove 'man-db'.

My solution, for better or worse, was to move the 'mandb' executable out of the way and substitute in a copy of 'true'

On my system:

sudo mv /usr/bin/mandb /usr/bin/mandb-OFF
sudo cp -p /bin/true /usr/bin/mandb
sudo rm -r /var/cache/man

This is easy to undo if the need arises. And I deleted the /var/cach/man directory, as it is no longer needed and recovered megabytes of space.

Any 'man' pages you need are grabbed from the source man directory and decompressed on the fly. No more caching means a slight inefficiency, but with today's speeder processors and disks, its minimal.

A caveat: Anytime you get a man-db package update, your modifications will be overwritten. Either apt-hold the 'man-db' package or be prepared to redo this at the whim of the 'man-db' package maintainers and distribution managers.

After this mod, you will still see the line "Processing triggers for man-db" fly by but it's a zero second thing. :-)

Good Luck.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like