How to remove the “installed manually” flag and revert to “automatically installed” with apt-get?

Aptitude can help you when you initially install the package:

aptitude install "zlib1g-dev&M"

Or, after your have installed the package:

aptitude markauto "zlib1g"

Edit: If you do not have aptitude, you can use

apt-mark auto zlib1g-dev

Leave a Comment