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.

  • 1
    There are solutions to your question, however, i recommend just reinstalling. Too much other configuration might have broken because postinst scripts simply are not prepared to fail gracefully for certain missing files. – anx Nov 14 '17 at 5:03
  • It might have not been clear in the question but my system is currently bootable and running. It just takes 30 seconds to boot while waiting on a network timeout (from network-online.target). To my understanding, fixing should only remove packages. More precisely those which are currently marked as manual but should be marked as an orphan and removed. It is not clear to me how there would be missing files. – HeroicKatora Nov 14 '17 at 7:14
  • Installation of .deb packages will only function properly if the target system provides certain essential binaries. If during any installation you were missing any essential packages (or files from such), consider your system a minefield for future unexpected behavior. – anx Nov 14 '17 at 9:41
  • I don't believe to be missing any binaries currently (debsums -c comes back clean) and that is not at all where I was aiming at. All I'd like to do is unmark the manual flag on the to their normal state. Should that fail, a reinstall is always an option but one I'd like to avoid. – HeroicKatora Nov 14 '17 at 10:29

Your Answer

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

Browse other questions tagged or ask your own question.