EDIT: After some experimentation, I found a solution that works perfectly for me!
It lists only the packages that have a newer version in the -backports repository, and nothing more (the other solutions listed additional packages.
To list available backports updates, run this command:
aptitude search -t $(lsb_release -sc)-backports '~U ~Abackports'
If you want the list to also display the current and newer version, run this command instead:
aptitude search -t $(lsb_release -sc)-backports -F '%p %v -> %V' '~U ~Abackports'
This will display something like this:
nvidia-settings 331.20-0ubuntu -> 346.59-0ubuntu
screen 4.1.0~20120320 -> 4.2.1-2~ubuntu
yelp-xsl 3.10.1-1 -> 3.12.0-1~ubunt
If you don't want to memorize this command, add this to your ~/.bashrc
:
alias apt-list-backports="aptitude search -t $(lsb_release -sc)-backports -F '%p %v -> %V' '~U ~Abackports'"
Now you only have to write apt-list-backports
!
Original answer
Just found another way:
apt-get upgrade -s -t $(lsb_release -sc)-backports
This will simulate an upgrade and list what packages would be upgraded.
But the upgrades to backports are also included (I think normal upgrades are shown too).
You can also add the option -V
to show the versions that the packages would be upgraded to.
To view the changelog of a package in the backports, use:
apt-get changelog -t $(lsb_release -sc)-backports PACKAGE_NAME