how to find installed 3rd party debs?

Derek Broughton news at pointerstop.ca
Mon Jun 9 14:16:22 UTC 2008


Wulfy wrote:

> Uwe Brauer wrote:
>>
>> >From time to time I install 3rd party packages, either generated by my
>> own using alien or from other sites.
>>
>> Now is there a possibility to find out which of my deb packages are
>> installed from the official reps and which are not?
>>   
> If you use aptitude, in the TUI has tree list of:
> 
> Installed Packages
> Not Installed Packages
> Obsolete and Locally Created Packages <===== this is what you're looking
> for.
> Virtual Packages
> Tasks
> 
> Everything but the indicated branch is in the repositories that
> sources.list points to.

That's convenient if the user just downloaded debs, but doesn't help for
situations where we've added a third party repository to the sources (I
suppose you could comment them out, run "aptitude update" and get the same
information).  Another solution is:

# apt-cache madison `aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' '`

The "aptitude search" finds manually installed packages (omit the !~M if you
need to include packages automatically installed as dependencies of
something else - but that would be an unusual case), "tr" and "cut" just
trim the results down to package names, and "apt-cache madison" is
like "apt-cache policy" but more conveniently formatted for large amounts
of data.  Pipe the output through "| grep -v ubuntu.com | sort -u" to find
those packages not from Ubuntu.

(And no, I didn't just go to the trouble of whipping this up for you -
somebody else gave me the aptitude command for finding the packages, and I
added the tr and cut to create a weekly cron job that keeps a list of all
my installed packages, so that I can easily recreate this setup on another
system)

-- 
derek





More information about the kubuntu-users mailing list