← 返回命令列表

Linux command

apt-mark 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo apt-mark auto [package]

Example

sudo apt-mark manual [package]

Hold

sudo apt-mark hold [package]

Allow

sudo apt-mark unhold [package]

Example

apt-mark showmanual

Example

apt-mark showauto

Example

apt-mark showhold

说明

apt-mark is a utility to change the status of installed packages. It can mark packages as automatically installed (making them candidates for autoremove), manually installed, or held at their current version.

参数

auto package
Mark package as automatically installed
manual package
Mark package as manually installed
hold package
Hold package at current version, preventing upgrades
unhold package
Remove hold, allowing package to be upgraded
showmanual
Show list of manually installed packages
showauto
Show list of automatically installed packages
showhold
Show list of held packages
showinstall
Show list of packages marked as install
showremove
Show list of packages marked for removal
showpurge
Show list of packages marked for purge
minimize-manual
Mark all dependency packages as auto, keeping only directly needed packages as manual
-f, --file filename
Read/write package stats from the specified filename instead of default location
-v, --verbose
Verbose output
-c, --config-file
Specify a configuration file to use
-o, --option
Set a configuration option (syntax: -o Foo::Bar=bar)

FAQ

What is the apt-mark command used for?

apt-mark is a utility to change the status of installed packages. It can mark packages as automatically installed (making them candidates for autoremove), manually installed, or held at their current version.

How do I run a basic apt-mark example?

Run `sudo apt-mark auto [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does auto package do in apt-mark?

Mark package as automatically installed