添加 ppa 存储库后更新的目的

添加 ppa 存储库后更新的目的

当使用添加 ppa 存储库时sudo add-apt-repository ppa:...,为什么我应该执行sudo apt-get update

我是 Ubuntu 新手,我不明白它的用途,因为没有从 repo 安装软件包。循环浏览我安装的软件包需要花费大量时间。

答案1

来自手册页:

update is used to resynchronize the package index files from their sources.
           The indexes of available packages are fetched from the location(s) specified
           in /etc/apt/sources.list. For example, when using a Debian archive, this
           command retrieves and scans the Packages.gz files, so that information about
           new and updated packages is available. An update should always be performed
           before an upgrade or dist-upgrade. Please be aware that the overall progress
           meter will be incorrect as the size of the package files cannot be known in
           advance.

添加apt-add-repository只是在中添加一行/etc/apt/source.list

apt-get update从所有已知的存储库下载最新的软件包索引

我也建议阅读apt-get 维基页面

相关内容