Reputation: 965
Every time I do an update or upgrade it takes a long time (several minutes) showing the following:
Processing triggers for man-db (2.9.4-2) ...
After that long wait, everything ends correctly.
Is there a way to get around this without putting the system at risk?
In this question, several solutions are suggested:
Solution 1:
sudo apt-get remove -y --purge man-db
Solution 2:
sudo mandb -t
rm -rf /var/cache/man
sudo mandb -c
Solution 3:
sudo apt install python3-pip
Is there a specific solution for Google Compute Engine?
Upvotes: 14
Views: 3211
Reputation: 39195
You can configure the man-db package such that its trigger isn't executed, anymore:
echo 'set man-db/auto-update false' | sudo debconf-communicate
sudo dpkg-reconfigure man-db
This is a fast operation that should only take 1 second or so.
As a consequence, commands such as apt-get install
and apt upgrade
should complete faster because the somewhat IO intensive man-db trigger is skipped.
Of course this is much less intrusive than simply purging all man pages. Man pages are still available and you thus can still consult them, which may prove to be useful useful when debugging a cloud environment.
FWIW, an extraordinary long running man-db trigger can also be seen as an indicator of very poor IO performance of your VM. Thus, perhaps you want to also look into switching to a cloud product that promises better IO.
Upvotes: 0
Reputation: 48893
You could remove man-db
(why on the Earth server needs man pages?):
sudo apt-get remove --purge man-db
or tell not to rebuild cache via debconf:
echo "set man-db/auto-update false" | sudo debconf-communicate && sudo dpkg-reconfigure man-db
Also you could disable the cache rebuilding in hackish way by removing "magic" file:
sudo rm -f /var/lib/man-db/auto-update
Upvotes: 8
Reputation: 1836
Try resizing your boot disk. In short, smaller disks have worse performance. Increasing the size of the book disk will improve the read and write speed.
Related to:
Google Compute Engine VM disk is very slow
Upvotes: 0