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

Re: how to remove GUI



On Thu, Sep 10, 2020 at 11:33:21PM -0500, Michael Morgan wrote:
> I recently installed Debian 9.13 on my machine.

So, not the current stable release....

> What is the correct way to
> completely remove GUI?

Well, in this *particular* case, your best course of action would probably
be a clean install of Debian 10.  Select only "Standard" (or maybe add
the OpenSSH server) during the initial task selection.

In the more general case, there are two strategies to remove a whole
bunch of packages that have a dependency tree relationship.  The first
strategy, which is relatively new, is to count on "apt autoremove",
which is a relatively new feature and has a lot of quirky behavior.
The concept here is that, when you installed the top-level package of
the large dependency tree (whether that's "gnome-core" or "task-something"),
apt will have marked that one package as "manually installed", and
anything else that was brought in at the same time, would not be so
marked.  Then, when you want to remove all of them, you first remove
the same top-level package.  This doesn't do much on its own, but now
all of the dependent packages have nothing anchoring them.  So if you
follow up with an "apt autoremove", it should, in theory, remove all
of the dependent packages.

In my experience, that doesn't work very well, so I've disabled autoremove
on my system.

The other strategy, which is a much older one, relies on you performing
a light analysis of the dependency tree and finding some lynchpin
package that is holding the whole thing up.  E.g. with GNOME 2.x, there
was some package like "libgnome-common" or something.  If you removed
that, it would remove everything else, because everything in GNOME
depended (directly or indirectly) on this one package.

In the case of a desktop environment, you really have two different
dependency trees to worry about.  There's the X server (xorg), and
there's the desktop environment (task-gnome-or-whatever).  You can
perform a separate analysis on each of these trees, identify which
low-level libraries or "common" packages are necessary to hold them
up, and remove those.

Or, as we've said a few times now, you can just leave the packages in
place and ignore them.  Or do a clean install.


Reply to: