[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Who installed package "foo"?



David Wright wrote:
> On Mon 02 Nov 2020 at 09:52:53 (+0700), Victor Sudakov wrote:
> > Dan Ritter wrote:
> > > > 
> > > > When I want to figure out what package has installed package "foo" as a
> > > > dependency, is there a less barbaric method than 
> > > > 
> > > > apt-get -s remove foo 
> > > 
> > > In addition to the other answers I see, you probably have a
> > > record of when it happened in /var/log/history.log
> > 
> > You probably mean /var/log/apt/history.log.* 
> > 
> > Unfortunately the information about "foo" seems to have already been rotated away.
> 
> $ grep -e '^Package:' -e 'Depends: .*\<foo\>' /var/lib/dpkg/status | grep -B1 -e 'Depends:' | less

Oh, parsing a text file is to my liking, thank you for the hint.

It's good that Debian's package database is a plain text file (as
compared to FreeBSD's sqlite for example).

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

Attachment: signature.asc
Description: PGP signature


Reply to: