0

Often I have a shell open already and I notice the software updater is telling me there are updates. To save me the time on extra mouse clicks, I want to just update via the shell. But if I just do "sudo apt-get update", the software updater still shows me pending updates and this is also the case even after rebooting the system - if I'm not mistaken.

So, if I want to do the same thing as the software updater in the shell, what commands do I have to call?

sudo apt-get update? sudo apt-get upgrade? sudo apt-get dist-upgrade? All of them?

1

apt-get update only refreshes the available packages lists. apt-get upgrade does the actual upgrade. apt-get dist-upgrade, unlike apt-get upgrade has the ability to install or delete packages (that's what the GUI call an "intelligent upgrade". Normally, since dependencies aren't supposed to change during a release's lifecycle, for day-to-day upgrades, apt-get update followed by apt-get upgrade is enough. You should run apt-get dist-upgrade only when some packages are held back.

All that (and far more) is explained in apt-get manual page (man apt-get).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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