Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to install a package via `apt-get` without flagging it as manually installed

I want to install some package (apt-get install XXX) but I don’t want that it will be added to the list of manually installed packages (apt-mark showmanual). How?

In Gentoo, the corresponding flag for emerge is --oneshot, which says to not add it to the world file (which corresponds to the list of manually installed packages).


One use case is that I want to write some scripts which would automatically install or reinstall some packages via apt-get install in order to fix up some messed up system, but I do not want to mark those packages as manually installed.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I imagine there are other use cases as well. As emerge also has such flag, I wondered if there is a similar flag for apt-get install.

Maybe the answer is simply no, and I have to manually mark it as auto (apt-mark auto XXX) afterwards.

>Solution :

You can add it to the list of automatically installed packages once again.

sudo apt install package
sudo apt-mark auto package
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading