You can probably do this with dselect, the older interface to the Debian package system. I don't remember the switches offhand, but you can get dselect to output a list of all installed packages and their version numbers. You could run this before and after an 'apt-get upgrade' and use 'diff' to compare the two.