2

I was looking to set up a small server installation and did the most minimal Debian 9.6 install the installer would let me do.

This install has stuff like Python2, Python3, Perl, bluetooth, Wi-Fi, curl, wget and more.

I'm not interested in debating whether these should be a part of a minimal install.

Rather, what parts of Debian's base install require the use of these? e.g. what requires Python2 in the base install? What requires Python3 in the base install? What requires bluetooth? How do I find these out?

Roxy
  • 385
  • I'm not fluent in debian, but wouldn't uninstalling, e.g., bluetooth tell you what it needs to uninstall because it has dependencies on it, and hopefully have a confirmation prompt? – Ulrich Schwarz Dec 30 '18 at 19:00
  • @UlrichSchwarz No, it doesn't. That assumes the dependencies are setup properly. If you try to remove perl, it just removes perl and says nothing about what depends on it. – Roxy Dec 30 '18 at 19:09

1 Answers1

5

To find out what requires a given package, you should look at two pieces of information:

  • the list of packages which apt remove ${package} tells you it would remove;
  • the information shown by apt show ${package}, in particular the “Priority” field, and the “Essential” field if present.

Essential packages, such as perl-base, and packages whose “Priority” field is “required”, should always be present. Furthermore, other packages don’t need to declare dependencies on essential packages, which makes it difficult to determine what requires them. Removing an essential or required package will require further confirmation and is liable to break your system in ways which are difficult to recover from.

For other packages, apt remove will show you exactly what needs them. For example, on a standard installation of Debian, Python 3 (the python3 package) is needed by reportbug, apt-listchanges, and lsb-release; if you don’t need any of those, you can remove Python 3. Python 2 (the python package) isn’t needed by anything, but it’s installed by default because its priority is “standard”. Bluetooth shouldn’t be installed by default, unless perhaps on a laptop with the corresponding task. Perl (as provided by perl, i.e. the full Perl installation rather than the basic Perl essentials) is needed by rename.

When installing, if you uncheck all the entries, including “standard system utilities”, in the package selection step, you’ll end up with a minimal installation, with only perl-base, no Python etc.

See also Is there any "base" Debian metapackage? where you’ll find information about the contents of Debian’s default installation.

Stephen Kitt
  • 434,908