# man > apt-mark(8)

---
type: CommandReference
command: apt-mark
mode: man
section: "8"
source: man-pages
---

## Quick Reference
- `apt-mark auto pkg...` — Mark packages as automatically installed (subject to auto-removal)
- `apt-mark manual pkg...` — Mark packages as manually installed (protects from auto-removal)
- `apt-mark hold pkg...` — Prevent package from automatic install, upgrade, or removal
- `apt-mark unhold pkg...` — Cancel a hold on a package
- `apt-mark showauto [pkg...]` — List automatically installed packages
- `apt-mark showmanual [pkg...]` — List manually installed packages
- `apt-mark showhold [pkg...]` — List held packages
- `apt-mark minimize-manual` — Mark dependencies of metapackages as automatically installed

## Name
apt-mark — show, set and unset various settings for a package

## Synopsis
shell
apt-mark [options] {auto|manual|minimize-manual|showauto|showmanual} [pkg...]
apt-mark [options] {hold|unhold|showhold|install|remove|purge|showinstall|showremove|showpurge} [pkg...]
## Options
- `-f, --file=filename` — Read/write package stats from the given file instead of the default `/var/lib/apt/extended_states`.
- `-h, --help` — Show a short usage summary.
- `-v, --version` — Show the program version.
- `-c, --config-file` — Specify a configuration file to read after the default configuration.
- `-o, --option` — Set an arbitrary configuration option, e.g. `-o Foo::Bar=bar`. Can be used multiple times.

## Examples
(No explicit examples in the original; common use cases are covered in Quick Reference.)

## See Also
- [apt-get(8)](https://manpages.debian.org/apt-get.8)
- [aptitude(8)](https://manpages.debian.org/aptitude.8)
- [apt.conf(5)](https://manpages.debian.org/apt.conf.5)

## Exit Codes
- `0` — Normal operation.
- non-zero — An error occurred.