Some time ago, I reinstalled every package as manual in the aftermath of an accidental mistake.
I upgraded to 17.04 without many problems, but now with 17.10 I noticed this to be the root cause of a very slow startup time. Specifically, I seem to have some (or several) old packages which rely on old systemd-network units and which I don't need anymore. But as all packages are marked as manually installed, I see now way of getting rid of them easily.
Now, how can I reset the manual installation flag on every package to what it would have been had I done proper management? I'd like to avoid a reinstallation but would be fine with some software is missing after the fixing step, as long as I can boot into a running system (with network connectivity with NetworkManager and without deleting config files).
Edit: The specific mistake, I broke my Ubuntu 15.04 by deleting the complete
/bin path. Instead of properly repairing it, I commanded
apt-get to simply install every currently installed package on the system. I did mention that previously as it the detail appears a bit misleading.