How to install `aide` without `aide-common` in debian?

Per this post,

Newer versions of Ubuntu (including 14.04) come with two packages for AIDE:

aide, with the aide command and manual page, and little else

aide-common, with a wrapper around that command, configuration files with rules, and cron configuration files that will cause AIDE to be run nightly 

If your AIDE is bundled like this, attempts to run the aide command directly will fail with the message:

Couldn't open file /var/lib/aide/please-dont-call-aide-without-parameters/aide.db for reading

even when parameters are supplied.

The configuration files are in different places, and to configure and use AIDE, the executables from aide-common must be used instead: aideinit, aide.wrapper, update-aide.conf, and aide-attributes.

In Debian 10,when you apt install aide,aide-common also be installed.
How to install aide without aide-common in debian?


Solution 1:

From apt-cache depends aide we can see that it's only reccomended:

[~]$ apt-cache depends aide
aide
  Conflicts: aide-dynamic
  Conflicts: aide-xen
  Recommends: aide-common
  Suggests: figlet

If it said Depends: aide-common it would be a hard requirement. Recommends is only a soft dependency, so you can choose to ignore it.

If we from there go on to man apt-get, to learn how apt-get works and search for recommends we find this:

   --no-install-recommends
      Do not consider recommended packages as a dependency for
      installing. Configuration Item: APT::Install-Recommends.

So the command apt-get install --no-install-recommends aide should install aide without installing aide-common.