Re: used vs. unused packages installed

2023-12-01 Thread Nate Bargmann
For this sort of thing I prefer the aptitude TUI.  Highlight the package
in question and hit 'r' and the list of reverse dependencies appears.
Installed packages will be in bold (also bright white with my terminal
settings).  One can continue up the chain by highlighting one of the
installed reverse dependencies and pressing 'r' again, and so on.

Another trick I have used is to use 'M' to mark the package as
automatically installed, if nothing depends on it then it will be marked
for removal.  Be careful here as a manually installed top level package
you might want to keep such as vim will be marked for removal and all
packages that were automatically installed with it.  To reverse the
proposed removal action, use 'Ctrl-u'.

While I often use apt at the command line, I've been using aptitude
since early 2001 and often prefer its TUI for doing drastic things!

- Nate

-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819



signature.asc
Description: PGP signature


Re: used vs. unused packages installed

2023-12-01 Thread Michel Verdier
On 2023-11-30, David Wright wrote:

> deborphan -Ps   or orphaner

Perhaps
deborphan -Ps --ignore-suggests

Or even
deborphan -Ps --ignore-suggests --ignore-recommends



Re: used vs. unused packages installed

2023-12-01 Thread Michel Verdier
On 2023-11-30, Greg Wooledge wrote:

> My first thought is that popularity-contest should be able to tell you
> this, because it's able to tell *Debian* which packages are "old"

I should live on the "old" but mandatory edge :)

20 tk
20 tcl
14 g++



Re: used vs. unused packages installed

2023-11-30 Thread David Wright
On Thu 30 Nov 2023 at 16:06:06 (-0600), Mike McClain wrote:
> Is there any way to determine which packages are used of the many
> that come with an install?

I don't know of one.

> My Raspberry Pi install of bookworm has some 1800 packages
> installed many of which I know I don't use, many others I suspect I
> don't use but don't know if some program I do use depends on them at
> some point in its life.

My principal bullseye has 2064, and has no DE, but includes
*TeX, LibreOffice, and a generous number of fonts. Without
knowing this sort of information, it's difficult to judge.

An obvious method is --no-install-recommends, but don't be surprised
when some packages lack functionality that you expect to be present.

> $ apropos editor | wc   reports 23 hits
> Six of which are various versions of VI which I don't use but pico,
> nano, mcedit, mousepad and mu-editor are also included. I only use jed
> but don't know what would break if I purged the others and am loathe
> to break a working system.

Some of these are in the same package (bits of vim ± gui) or part
of another package (mc/mcedit), and some are too small to worry about
(nano/pico). Others are too specialised to be thought of as just
editors (editres, gparted, mid3v2), and the lack of some will break
your system (sed).

> There are 259 packages whose name starts with 'python', admittedly I
> could purge one a week and see if anything breaks, that would only take
> 5 years but I'm not quite that patient.

Only 58 here; what am I doing wrong? No, actually I thought you would
approve of the number, as it goes to show how much python has been
fragmented so that you only have to install the parts needed.

> Suggestions?

apt-get --purge autoremove
deborphan -Ps   or orphaner
cruft-ng
debfoster

The last of these is, I think, like --no-install-recommends,
something you set up beforehand.

BTW are you seriously short of space, or just a tidy person?
(You don't have to answer.)

Cheers,
David.



Re: used vs. unused packages installed

2023-11-30 Thread John Hasler
 Mike McClain writes:
> Is there any way to determine which packages are used of the many that
> come with an install?  My Raspberry Pi install of bookworm has some
> 1800 packages installed many of which I know I don't use, many others
> I suspect I don't use but don't know if some program I do use depends
> on them at some point in its life.

When you remove a package using apt it removes packges that depend on
it.

Run

apt -s remove  | grep Remv

This will list all the packages that depend on  and therefor
would also be removed. "apt -s" simulates the action without actually
changing anything.  It needn't be run as root.
-- 
John Hasler 
j...@sugarbit.com
Elmwood, WI USA



Re: used vs. unused packages installed

2023-11-30 Thread Greg Wooledge
On Thu, Nov 30, 2023 at 04:06:06PM -0600, Mike McClain wrote:
> Is there any way to determine which packages are used of the many
> that come with an install?

My first thought is that popularity-contest should be able to tell you
this, because it's able to tell *Debian* which packages are "old"
(not recently used).

One of the programs that comes with it is /usr/sbin/popcon-largest-unused
which looks like what you want.

See .  Looks like
you have to allow popcon to run at least once.



Re: used vs. unused packages installed

2023-11-30 Thread Dan Ritter
Mike McClain wrote: 
> Is there any way to determine which packages are used of the many
> that come with an install?
> My Raspberry Pi install of bookworm has some 1800 packages
> installed many of which I know I don't use, many others I suspect I
> don't use but don't know if some program I do use depends on them at
> some point in its life.
> $ apropos editor | wc   reports 23 hits
> Six of which are various versions of VI which I don't use but pico,
> nano, mcedit, mousepad and mu-editor are also included. I only use jed
> but don't know what would break if I purged the others and am loathe
> to break a working system.
> There are 259 packages whose name starts with 'python', admittedly I
> could purge one a week and see if anything breaks, that would only take
> 5 years but I'm not quite that patient.
> 
> Suggestions?

Pick a suspect package and run

apt-cache rdepends --installed PACKAGE

That shows you all the packages which are installed and depend
on this PACKAGE.

That saves you from the uninstall-and-see-what-breaks dance.

-dsr-



used vs. unused packages installed

2023-11-30 Thread Mike McClain
Is there any way to determine which packages are used of the many
that come with an install?
My Raspberry Pi install of bookworm has some 1800 packages
installed many of which I know I don't use, many others I suspect I
don't use but don't know if some program I do use depends on them at
some point in its life.
$ apropos editor | wc   reports 23 hits
Six of which are various versions of VI which I don't use but pico,
nano, mcedit, mousepad and mu-editor are also included. I only use jed
but don't know what would break if I purged the others and am loathe
to break a working system.
There are 259 packages whose name starts with 'python', admittedly I
could purge one a week and see if anything breaks, that would only take
5 years but I'm not quite that patient.

Suggestions?

Thanks,
Mike McClain
--
Every problem has a gift for you in its hands.
- Richard Bach