Marking a package as not explicitly installed, but keep it as an installed dependency

view story

http://ubuntuforums.org – Hi Everyone, I've already posted the following question in the "Installation & Upgrades" support category, but it might be going too much into the package-manager details so I'm trying here, too. Due to a bad internet connection, I had to install a piece of software by downloading the two .debs and installing them with dpkg -i. So I have a package A that depends on B, and I've installed them both by hand. Now what I want is that if at some point, I remove A, then B gets flagged as a package that is no longer needed, and gets removed, too. How do I flag package B so that the p (Hardware)