# 记录系统中所有软件包的安装状态和配置信息。 # 关注软件包的安装状态和配置情况。例如,可以查看软件包是否已安装、是否配置完成、是否存在错误等。 /var/lib/dpkg/status # 部分内容 Package: apt-utils Status: install ok installed Priority: important Section: admin Installed-Size: 660 Maintainer: Ubuntu Developers <[email protected]> Architecture: amd64 Source: apt Version: 2.7.14build2 Depends: apt (= 2.7.14build2), libapt-pkg6.0t64 (>= 2.7.14build2), libc6 (>= 2.34), libdb5.3t64, libgcc-s1 (>= 3.3.1), libstdc++6 (>= 13.1) Description: package management related utility programs This package contains some less used commandline utilities related to package management with APT. . * apt-extracttemplates is used by debconf to prompt for configuration questions before installation. * apt-ftparchive is used to create Packages and other index files needed to publish an archive of Debian packages * apt-sortpkgs is a Packages/Sources file normalizer. Original-Maintainer: APT Development Team <[email protected]>
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. debhttp://archive.ubuntu.com/ubuntu/jammymainrestricted # deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
## Major bug fix updates produced after the final release of the ## distribution. debhttp://archive.ubuntu.com/ubuntu/jammy-updatesmainrestricted # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. debhttp://archive.ubuntu.com/ubuntu/jammyuniverse # deb-src http://archive.ubuntu.com/ubuntu/ jammy universe debhttp://archive.ubuntu.com/ubuntu/jammy-updatesuniverse # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. debhttp://archive.ubuntu.com/ubuntu/jammymultiverse # deb-src http://archive.ubuntu.com/ubuntu/ jammy multiverse debhttp://archive.ubuntu.com/ubuntu/jammy-updatesmultiverse # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. debhttp://archive.ubuntu.com/ubuntu/jammy-backportsmainrestricteduniversemultiverse # deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# 安装一个或多个指定的包 apt install vim # 用来删除包,但是会保留包的配置文件 apt remove vim # 用来删除包,在删除包的同时删除其配置文件 apt purge vim # 用于删除自动安装的包(满足其他包的依赖关系),由于依赖关系的更改或需要它们的包已被删除 apt autoremove
# 用于在可用包列表中搜索给定的项并显示匹配到的内容 apt search vim # 显示关于给定包的信息,包括它的依赖关系、安装和下载大小、包的来源、包内容的描述等等 apt show vim # 显示满足特定条件的包列表,默认列出所有的包 apt list --upgradeable # 列出可更新的软件包及版本信息 apt list --installed # 列出已安装的软件包及版本信息