Thursday, November 1, 2012

View available updates from terminal without updating the system / Ubuntu

I find it a faster way to install updates on my Ubuntu machine from terminal rather then using a GUI package manager.

sudo apt-get update  // collects information on updated packages from the repos
sudo apt-get upgrade // install upgrades for packages for which updates are available

The commands above are cool, of course, and quick to type, but one thing always annoyed me - I could only see what was updated after I actually initialized the process of upgrading the system. Well, not cool (GUI package manager would show what packages are upgradable).

How to view available updates from terminal without updating the system:

apt-get --just-print upgrade
apt-get -s upgrade

These 2 show the very same output (they both simulate an upgrade, don't really do it). So the 2nd one is shorter to type.
Another command for the same purpose:
aptitude search ~U

Anyway, I find a command like below a bit more logical when read by a human being than simulating an upgrade:
sudo yum list updates // view available upgradable packages on rpm distros.

1 comment:

  1. I asked Google how to find out what updates were available and it took me here. Thanks - very useful :-)

    ReplyDelete