当前位置:网站首页>apt-cache command
apt-cache command
2022-08-09 14:47:00 【A positive little salted fish】
一 命令介绍
apt-cache Commands can be displayed APT Various information in the internal database.这些信息是从 sources.list Aggregate caches from different sources within the file.于运行 apt update generated during operation.
APT包管理器工作在软件包元数据的本地缓存上.通过apt-cache命令,可以查询本地APT缓存并获得相关信息.
APT 缓存的位置是 /var/lib/apt/lists/ 目录.
缓存哪些仓库元数据取决于你的源列表中 /etc/apt/sources.list 文件中添加的仓库,以及位于 /etc/apt/sources.list.d 目录下的额外仓库文件.
apt-cache 并不能清除 APT 缓存.为此,你必须使用 apt-get clean 命令.
二 缓存
A cache is a staging system,Proximity methods are expensive (讲究性能) 时,Used to speed up access to frequently used data.This concept has a wide range of applications,From microprocessor cores to high-end storage systems.
在 APT 的环境,参照 软件包名称 The file is their location at the mirror station.也就是说,When using database software packages recently,Read over the network every time,Very no impeachment rate.所以,APT Save a copy within its file (在 /var/lib/apt/lists/) Every time you search for local files.同样的,/var/cache/apt/archives/ Save already downloaded packages to avoid repeated downloads when needed after removal.
apt-cache Commands can do keyword package searches apt-cache search 键词.Also shows available versions of package headers apt-cache show 软件包名称.This command provides package descriptions、its dependencies、maintainer name, etc.apt search、apt show、aptitude search、aptitude show All work the same way.
1 操作
1、搜索软件包:
apt-cache search package_name
2、也可以缩小搜索范围,只在软件包名称中查找搜索词:
apt-cache search --names-only package_name
3、如果想要知道完整细节,可以使用 --full 标志:
apt-cache search --names-only package_name --full
4、获取详细的包装信息:(已经知道确切的软件包名称)
apt-cache show package_name
5、可以显示软件包的名称、版本、正向和反向依赖关系等信息:
apt-cache showpkg package_name
6、apt-cache 的策略
policy 选项可以帮助你调试与 preference 文件相关的问题.
如果指定了软件包的名称,它将显示该软件包是否已经安装,在哪个版本的仓库中可用,以及它的优先级.
apt-cache policy package_name
默认情况下,每个已安装的软件包版本的优先级为 100,未安装的软件包的优先级为 500.
同一软件包可能有多个不同优先级的版本.APT 会安装优先级较高的版本,除非安装的版本较新.
7、检查软件包的依赖关系和反向依赖关系:
可以在安装之前(甚至在安装之后)检查一个包的依赖关系.它还会显示所有可能满足依赖关系的软件包.
apt-cache depends package三 其他axi-cache
apt-cache search is the basic tool,应用在 grep 软件包描述.Entering too many keywords may return a large number of results or no data at all.
axi-cache search 术语,反过来说,提供更好的结果,Sort by relevance.使用 Xapian search engine and it is apt-xapian-index A section of packages indexes information about all packages (更多的是,like from all Debian 软件包的 .desktop 档).显示标签 (见专栏 Go one step further and label the field) and send back the result in milliseconds.
参考链接
1. 【Linux】apt-cache Learning and using commands_Cappuccino-jay的博客-CSDN博客_apt-cache
边栏推荐
猜你喜欢
随机推荐
System Scalability Thinking
C语言 求一个整数存储在内存中的二进制中1的个数(多种方法详解)
ELK部署
Es7.x使用RestHighLevelClient进行增删改和批量操作
Column of openharmony container component
系统可扩展性思考
汇编语言学习(九)
Row of openharmony container components
湖仓一体,Hologres加速云数据湖DLF技术原理解析
C语言中常用的数组排序方法:冒泡排序、选择排序、插入排序、数组的移动(含代码详解)以及相关联系题
手机厂商失守元宇宙
理解redis,一篇就够
12.cuBLAS开发指南中文版--cuBLAS中的Level-1函数asum()和axpy()
使用 compose 的 Canvas 自定义绘制实现 LCD 显示数字效果
C语言 指针的解引用详解
小程序开发制作成本是多少?三种开发方法成本分析!
Using the NVIDIA Kaolin Wisp reconstruction of 3 d scene
汇编语言学习(六)课程设计一
*2-3 OJ 1164 导弹拦截之升级版
*2-4 每日温度 *2-5 接雨水









