I sometimes see update commands for Ubuntu which make it twice as this sample
sudo apt-get update && sudo apt-get upgrade
I wonder why do we have to call it twice like that? Why not just once?
I sometimes see update commands for Ubuntu which make it twice as this sample
sudo apt-get update && sudo apt-get upgrade
I wonder why do we have to call it twice like that? Why not just once?
Those are two different commands. This one:
sudo apt-get update
Says to update the package index file. If there is a newer version of a package available, replace it in the index.
sudo apt-get upgrade
Says to compare all the packages installed on the system to the updated package index and offer all upgrades available.
update is for checking for new updates, and upgrade is for install the update(s). Is it right?
– Nam G VU
Nov 06 '14 at 02:46
update is for updating the local index of packages from the repository and upgrade is for performing an upgrade of all packages for which a newer version is known in the index.
– thomasrutter
Nov 06 '14 at 04:47