Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When adding a ppa repository using sudo add-apt-repository ppa:..., why should I execute sudo apt-get update?

I am new to Ubuntu and I don't see the purpose of it because there aren't packages installed from the repo. It only takes a lot of time to cycle through my installed packages.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

From the manpages:

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.

Adding apt-add-repository just adds a line to /etc/apt/source.list.

apt-get update downloads the latest package index from all the known repositories

Also I recommend reading apt-get wiki pages

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.