The `apt` tool provides the option `--no-install-recommends`.
If you want to disable the recommended packages installation by default, you can:
echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/99disable-recommends.conf
You may also want to disable the suggested packages:
echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/99disable-recommends.conf