Recently I found a problem: while apt upgrade, it’s always being stuck at “Processing triggers for man-db”. In fact, the process is still running, just too slowly.
I guess triggering man-db will take too much CPU time to finish so that it looks like being stuck. I didn’t monitor the disk I/O status, I guess it needs a number of disk I/O actions. If you’re using HDD, that would be slow.
Maybe there’s a bug. As far as I know, man-db problem exists in every Debian based Linux distribution, including Debian and Ubuntu. The earliest report I see is in 2012, and Debian 11, the latest stable Debian version, also has this problem.
Because triggering man-db is nearly the last step of upgrade, it seems like organizing and concluding something. It doesn’t upgrade man-db package itself, so using
apt-mark hold man-db command is useless.
Some tutorials say that remove the man-db package or delete the cache folder of man-db, it may cause other problems.
So my suggestion is that make sure your machine has high enough CPU calculating power and disk I/O amount.