apt-mark详解

本文详细介绍了apt-mark在Debian/Ubuntu系统中用于标记包的自动安装、手动安装和heldback状态的功能,包括apt-markautopackagename、apt-markmanual、apt-markhold、apt-markunhold等命令的用法和显示已标记包的操作。

1、简介

apt-mark常用于标记一个包是否是自动安装的。

2、apt-mark auto packagename

标记一个包为自动安装,但是当没有手工安装的包以来此包的时候,此包会删除

3、apt-mark manual

标记一个包为手动安装,但是当没有其他包依赖次包的时候,该包并不会自动删除

4、apt-mark hold

标记一个包为held back状态,阻止该包自动安装、更新和删除

5、apt-mark unhold

取消之前标记的held back状态,允许该包的所有操作

6、apt-mark showauto

打印出所有已经自动安装的包

7、apt-mark showmanual

打印出所有已经手动安装的包

8、apt-mark showhold

打印出所有已经设置held back状态的包

deepcar@ubuntu:~/Desktop$ apt-get apt 2.0.10 (arm64) Usage: apt-get [options] command apt-get [options] install|remove pkg1 [pkg2 ...] apt-get [options] source pkg1 [pkg2 ...] apt-get is a command line interface for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies. Most used commands: update - Retrieve new lists of packages upgrade - Perform an upgrade install - Install new packages (pkg is libc6 not libc6.deb) reinstall - Reinstall packages (pkg is libc6 not libc6.deb) remove - Remove packages purge - Remove packages and config files autoremove - Remove automatically all unused packages dist-upgrade - Distribution upgrade, see apt-get(8) dselect-upgrade - Follow dselect selections build-dep - Configure build-dependencies for source packages satisfy - Satisfy dependency strings clean - Erase downloaded archive files autoclean - Erase old downloaded archive files check - Verify that there are no broken dependencies source - Download source archives download - Download the binary package into the current directory changelog - Download and display the changelog for the given package See apt-get(8) for more information about the available commands. Configuration options and syntax is detailed in apt.conf(5). Information about how to configure sources can be found in sources.list(5). Package and version choices can be expressed via apt_preferences(5). Security details are available in apt-secure(8). This APT has Super Cow Powers.有什么问题
03-09
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值