Forrest logo
tool overview
On this page you find all important commands for the CLI tool apt-mark. If the command you are looking for is missing please ask our AI.

apt-mark

Apt-mark is a command line tool used in Debian-based systems like Ubuntu to interact with the Apt package management system. It allows users to mark packages for various purposes. With this tool, packages can be marked as "automatically installed," meaning they were installed as a dependency, to prevent them from being removed when no longer needed by other packages. Alternatively, packages can be marked as "manually installed" to ensure they are not inadvertently removed.

Apt-mark can also be used to hold packages at their current version, preventing them from being upgraded during system updates. Held packages remain at their current version until explicitly unheld by the user. Additionally, apt-mark can be used to unhold packages that have been previously held.

Another useful feature of apt-mark is the ability to show the auto-installed status of packages, allowing users to see which packages were automatically installed and which were manually installed. This can be helpful when trying to identify packages that are no longer needed and can be safely remove.

Furthermore, apt-mark allows for easy removal of packages that were marked as automatically installed but are no longer required by any other package. This helps streamline the system by removing unnecessary software.

Apt-mark's syntax is straightforward, with commands such as "markauto," "markmanual," "hold," "unhold," and "showauto" being the main options. It provides users with control and flexibility over package management in a command line environment, enabling them to customize their system to their specific needs.

This tool is often used by system administrators and advanced users who prefer working with command line interfaces for package management tasks, as it offers more fine-grained control over packages than graphical tools. Overall, apt-mark makes managing packages in Debian-based systems more efficient and tailored to individual requirements.

List of commands for apt-mark:

  • apt-mark:tldr:202d0 apt-mark: Hold a package at its current version and prevent updates to it.
    $ sudo apt-mark hold ${package_name}
    try on your machine
    explain this command
  • apt-mark:tldr:87089 apt-mark: Allow a package to be updated again.
    $ sudo apt-mark unhold ${package_name}
    try on your machine
    explain this command
  • apt-mark:tldr:914fb apt-mark: Show manually installed packages.
    $ apt-mark showmanual
    try on your machine
    explain this command
  • apt-mark:tldr:96d4c apt-mark: Show held packages that aren't being updated.
    $ apt-mark showhold
    try on your machine
    explain this command
  • apt-mark:tldr:bacf8 apt-mark: Mark a package as automatically installed.
    $ sudo apt-mark auto ${package_name}
    try on your machine
    explain this command
tool overview