Ubuntu – How to find what packages do not come from a repository?

apt

I have problem with one deb repository (specifically medibuntu.org) today – synaptic is not able to find repository indexes (and they are really not there – maybe due to yesterday's changes).

So I have the errors flying all over the place. I could just remove that repository – but I simply do not remember which packages came from it, so just removing it could screw my updates on some crucial package.

So, my question is – how do I find, which installed packages can not be found in any repository?

Best Answer

  • aptitude can do this query for you, with the ~o ("o" for "obsolete") search:

    aptitude search ~o
    

    this lists the packages that can no longer be downloaded.

    I don't think there's an apt-cache search equivalent, and I'm not sure about synaptic.

    For more info on search terms with aptitude, check out the section on search terms in the aptitude reference guide.