On Wed 23 Sep 2026 at 19:53:34 (+0000), Andy Smith wrote:
> Hi,
> 
> On Wed, Sep 23, 2026 at 06:39:10PM +0000, [email protected] 
> wrote:
> > Is there a way to uninstall all the packages and *all* of their
> > dependencies installed after a certain data?
> 
> I think the easiest thing to do is to look in /var/log/apt/history.log
> (and its .xx.gz archives) for the list of installed p[ackages, put them
> all in one long "apt purge" command and then afterwards run "apt
> autoremove"  to get rid of any unused dependencies.

The "Commandline:"s lines should give the deliberately installed
packages, but the "Install:" lines should give all the package names,
including dependencies. The latter list is more tedious to edit
because of the versions and architectures, which need stripping.

> I don't believe there is any other place that records date of package
> installation.

Were you to lose the history logs, I think you should be able to
get a similar list from: ls -Ggldt --time=birth /usr/share/doc/*

I don't rotate my apt logs, so I've never had any need to use the
second method. It might be interesting to compare the lists produced
by both methods.

Cheers,
David.

Reply via email to