Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #262112

Re: How can I find packages manually installed using "dpkg -i"?

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: How can I find packages manually installed using "dpkg -i"?
Date 2023-10-03 06:30 +0200
Message-ID <HkFcJ-dbev-1@gated-at.bofh.it> (permalink)
References (1 earlier) <HkobT-d0SB-3@gated-at.bofh.it> <Hkr9M-d2Hc-5@gated-at.bofh.it> <Hkrt7-d2NN-1@gated-at.bofh.it> <HkrCN-d2RK-1@gated-at.bofh.it> <HkrMt-d3au-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 02 Oct 2023 at 16:00:57 (+0200), tomas@tuxteam.de wrote:
> On Mon, Oct 02, 2023 at 09:52:39AM -0400, Greg Wooledge wrote:
> > On Mon, Oct 02, 2023 at 09:43:39AM -0400, The Wanderer wrote:
> > > On 2023-10-02 at 09:28, Ottavio Caruso wrote:
> > > > Yeah, the one for which I had to manually use "dpkg -i".
> > > 
> > > That information is not tracked.
> > > 
> > > What is tracked is "the package versions known to be available from each
> > > registered repository" and "the package versions which are installed".
> > 
> > There *is* tracking.  Packages can be marked as "automatically installed"
> > or not.  The problem is, the marking is not consistent with user
> > expectations.
> 
> But not if you use dpkg directly (dpkg doesn't even resolve dependencies,
> but just gives up when some aren't met). That's why I proposed comparing
> apt logs and dpkg logs -- things in the latter but not in the former were
> probably installed with straight dpkg.
> 
> It probably ain't straightforward, though. And the logs might have been
> rotated out anyway.

If you have complete logs and try this, presumably coming up with a
sorted list of apt-installed packages (remembering --unique) from its
history, and a similar list from the ' install ' lines in dpkg.log*,
bear in mind that you need to ignore the dpkg.log until about when
locales is installed, as APT never sees a load of packages installed
before that point.

Also be careful if you're tempted to sort dpkg.log's install lines
by time, instead of grepping the logs in the correct (non-collating)
order, because for people in the western hemisphere, the packages you
want to ignore will have UTC timestamps, placing them in the midst
of packages installed after the d-i has finished. (The timestamps
jump from UTC to localtime after locales is installed.)

To avoid all these complications in future, I would suggest that the
OP (and anybody else) modify their logrotate configuration files thus:

  $ grep rotate /etc/logrotate.d/{apt,dpkg}
  /etc/logrotate.d/apt:  rotate -1
  /etc/logrotate.d/apt:  rotate -1
  /etc/logrotate.d/dpkg:  rotate -1
  $ 

and jettison  dpkg -i  in favour of:  apt install /path/to/some.deb
where the /path/to/ is essential even if it's only ./some.deb.

With those changes, it will be easy to spot these particular packages
just by grepping .deb$ (strictly, \.deb$) in …/apt/history.log*.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How can I find packages manually installed using "dpkg -i"? Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> - 2023-10-02 12:10 +0200
  Re: How can I find packages manually installed using "dpkg -i"? <tomas@tuxteam.de> - 2023-10-02 12:20 +0200
  Re: How can I find packages manually installed using "dpkg -i"? "Marco M." <mm@dorfdsl.de> - 2023-10-02 12:20 +0200
    Re: How can I find packages manually installed using "dpkg -i"? Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> - 2023-10-02 15:30 +0200
      Re: How can I find packages manually installed using "dpkg -i"? "Marco M." <mm@dorfdsl.de> - 2023-10-02 15:50 +0200
      Re: How can I find packages manually installed using "dpkg -i"? The Wanderer <wanderer@fastmail.fm> - 2023-10-02 15:50 +0200
        Re: How can I find packages manually installed using "dpkg -i"? Greg Wooledge <greg@wooledge.org> - 2023-10-02 16:00 +0200
          Re: How can I find packages manually installed using "dpkg -i"? <tomas@tuxteam.de> - 2023-10-02 16:10 +0200
            Re: How can I find packages manually installed using "dpkg -i"? David Wright <deblis@lionunicorn.co.uk> - 2023-10-03 06:30 +0200
              Re: How can I find packages manually installed using "dpkg -i"? <tomas@tuxteam.de> - 2023-10-03 08:30 +0200
          Re: How can I find packages manually installed using "dpkg -i"? The Wanderer <wanderer@fastmail.fm> - 2023-10-02 16:10 +0200
  Re: How can I find packages manually installed using "dpkg -i"? Max Nikulin <manikulin@gmail.com> - 2023-10-02 13:00 +0200
  Re: How can I find packages manually installed using "dpkg -i"? Mike Castle <dalgoda+debian@gmail.com> - 2023-10-04 05:00 +0200
    Re: How can I find packages manually installed using "dpkg -i"? Mike Castle <dalgoda+debian@gmail.com> - 2023-10-04 05:20 +0200
    Re: How can I find packages manually installed using "dpkg -i"? Max Nikulin <manikulin@gmail.com> - 2023-10-04 09:50 +0200
    Re: How can I find packages manually installed using "dpkg -i"? David Wright <deblis@lionunicorn.co.uk> - 2023-10-05 06:20 +0200
      Re: How can I find packages manually installed using "dpkg -i"? John Crawley <john@bunsenlabs.org> - 2023-10-05 08:10 +0200
        Re: How can I find packages manually installed using "dpkg -i"? Greg Wooledge <greg@wooledge.org> - 2023-10-05 13:00 +0200

csiph-web