How to get list of to-be-upgraded packages using apt-get?
I don't use Ubuntu regularly but how about this:
$ apt-get -s --no-download dist-upgrade -V | grep '=>' | awk '{print$1}'
It prints one package per line. As described in man apt-get
:
-V, --verbose-versions
Show full versions for upgraded and installed packages. Configuration Item: APT::Get::Show-Versions.