I'm working on some system admin automation using fabric and I'd like to be able to monitor the number of packages that need upgrading on a given machine. This is the same information that I can see when I first log in to a machine, i.e. this part:
35 packages can be updated.
22 updates are security updates.
Is there a command that I can run (preferably without sudo) that gives just that information?
I've looked at the apt-python bindings, but they seem to have a high learning curve and they also appear to be changed around a lot -- I'd like something that will work at least as far back as lucid without needing to do different things on different Ubuntu versions.
cating the file you suggest is blank, and the script you first point to doesn't exist on this machine -- is it in some package that needs to be installed? I have/usr/lib/update-manager, but noupdate-notifierdirectory. – KayEss Jun 22 '11 at 11:42update-notifier-commonthat was installed automatically on a fresh installation (not upgrade from 10.10). – enzotib Jun 22 '11 at 12:17/var/lib/update-notifier/apt-checkthis looks like it returns the two numbers, i.e. 43;24 (43 updates, 24 are security ones), but even that doesn't appear on all my machines. I suppose that this file might have moved between packages in different versions. – KayEss Jun 23 '11 at 02:12