Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJanek Rezner
12,973 PointsWhich command will update the software you have installed to the latest version?
in Console Foundations -> stage 5 (installing software) video Jim runs $ sudo apt-get update
to check for updates
but the correct answer to the question above in the following quiz section is $sudo apt-get upgrade
...
can anyone explain this?
2 Answers
Kevin Kenger
32,834 PointsHey Yann,
apt-get update
doesn't install or upgrade software, it simply displays packages that are available to download. apt-get upgrade
however, will install newer versions of packages that you already have. In order for the package manager to be aware of available upgrades, you have to update the list. That's why we run both, apt-get update
first, and then apt-get upgrade
. I hope that helps!
James Barnett
39,199 PointsThey are 2 different things.
-
apt-get update
updates the list of available packages and their versions, but it does not install or upgrade any packages. -
apt-get upgrade
actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed.
source: http://askubuntu.com/a/94104
James Barnett
39,199 PointsJames Barnett
39,199 PointsYou'll usually want to do
apt-get update && apt-get upgrade
so that you first get an updated list of packages and then you upgrade all of your installed packages.