Product SiteDocumentation Site

6.3. The apt-cache 命令

apt-cache 命令可顯示 APT 內部資料庫裡的多種資訊。這些資訊是從 sources.list 檔案內聚集不同來源的快取。於執行 apt update 運作時產生的。
apt-cache 命令可以做鍵詞套件搜尋 apt-cache search 鍵詞。也能顯示套件標頭的可用版本 apt-cache show 套件名稱。這個命令提供套件說明、其相依性、維護者名稱等。apt searchapt showaptitude searchaptitude show 都以同樣方式運作。
有些功能極少用到。例如,apt-cache policy 顯示套件來源及個別套件的優先性。另個例子是apt-cache dumpavail 顯示所有套件全部版本的標頭。apt-cache pkgnames 顯示出現在快取至少一次的套件清單。