Spread the love

Apt-mark is a command line tool that can help you choose which applications to be updated disabled or halted. You can set various settings for a package, such as
marking a package as being automatically/manually installed or changing dpkg selections such as hold, install, deinstall and purge.

For automatic and manual installation of packages you have several options like auto ( auto is used to mark a package as being automatically installed, which will cause the
package to be removed when no more manually installed packages depend on this package ), manual ( package as being manually installed, which will prevent the
package from being automatically removed if no other packages depend on it. ), showauto ( to print a list of automatically installed packages ) and showmanual ( can be used in the same way as showauto except that it will print a list of manually installed packages instead )

Here is an exmaple:


To prevent changes for a package we have the commands hold ( used to mark a package as held back, which will prevent the package from being
automatically installed, upgraded or removed ), unhold ( used to cancel a previously set hold on a package to allow all actions again ) and show hold ( used to print a list of packages on hold in the same way as for the other show commands ).

Here is an example:


In conclusion, we would say that the apt-mark command is one of the tools we need to know and be aware of its capabilities. For example, if you use the squid application and do not want the whole company to crash from one of its updates with the apt-mark command, you can easily defend yourself and test before launching the new update.

We hope you enjoyed this article. if that is so please rate this page with the stars bellow and subscribe to our YouTube channel.

Leave a Reply