2

As usual, every time I update I'm getting a list with which programs received an update. I also have a few PPA sources that are active.

I would like to know which update came from which source.

I'm using Mint, but I would prefer to do so from shell so this is relevant for all distributions using apt-get

Tom Klino
  • 842

1 Answers1

1

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
ZN13
  • 695