APT Updates – How Often to Update Using apt-get update


Someone told me to use the command "apt-get update "to update my software and hardware updates frequently. What exactly is updated and how often should I update it.

Best Answer

apt-get is an incredibly useful tool. Try reading this https://help.ubuntu.com/community/AptGet/Howto site to get an idea of what apt-get can be used for!

As for your specific question, @Braiam and @Alaa have very well done answers, read theirs first. Your friend is rather mis-informed. This is from the man-page for apt-get:

update: 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.

I like what @Braiam broke this down into:

QUOTE: @Braiam:

Long story short: this download the list of packages and their versions from repositories so you can use them later to install, remove or upgrade packages. This don't update/upgrade packages on their own. It just refresh the list of the packages. For upgrading packages you use apt-get upgrade:

upgrade: upgrade is used to install the newest versions of all packages 
currently installed on the system from the sources enumerated in /etc/apt/sources.list. 
Packages currently installed with new versions available are retrieved and upgraded; 
under no circumstances are currently installed packages removed, or packages not already 
installed retrieved and installed. New versions of currently installed packages that 
cannot be upgraded without changing the install status of another package will be left 
at their current version. An update must be performed first so that apt-get knows that 
new versions of packages are available.

Obviously apt-get update doesn't download/install the latest and greatest program update(s), it only makes sure that any newly added PPAs are included in the sources.list file. This allows you to install programs from non-default sources and is also why you have to run apt-get update after add-apt-repository.

In your case you would want to run apt-get update after adding a PPA. Ubuntu automatically checks for updates either every week or as you configure it. It, when updates are available, shows a nice little GUI that lets you choose the updates to install, and then downloads/installs the selected ones.

Unless you want to force Ubuntu to check for updates, you don't need to run any special commands, just use your computer normally and you will eventually be alerted to the updates and be allowed to install them.

Related Question