This thread says you can run apt-cache policy <package name>
. With this and aptitude -F%p --disable-columns search ~U
from here, you can easily put together a small shell script to check and print for each package that will be upgraded,
aptitude -F%p --disable-columns search ~U | xargs apt-cache policy
Works perfectly for me on Trisquel, if you add that to your ~/.bashrc as an alias, for example
alias apt-wat='aptitude -F%p --disable-columns search ~U | xargs apt-cache policy'
You've got a bretty cewl command, shame it prints way too much.
or if you want to see where each package you have installed came from with dpkg -l
, something like
dpkg -l | awk '{print $2}' | xargs apt-cache policy
apt-get -s upgrade
would show you approximately where the packages are coming from. – Faheem Mitha Nov 03 '15 at 22:48