I am planning to write a script to get the list of upgrades available on Ubuntu server and upgrade them. I can get the list of upgrades with "apt-get -s upgrade".
But how to get a report on list of packages that failed during the above command. Any specific command or technique? I can't find any option in apt-get or other command.