Configure minimalism in Devuan
This document describes how to configure APT to no longer install recommends or suggests, and to treat them as unimportant so they can be retroactively removed. This process also applies directly to Debian, so it can be done before or after migrating to Devuan.
These steps are possible thanks to a tip from TheFlash.
We will first configure APT to treat recommended and suggested packages as unimportant.
It should be mentioned that suggests are not installed by default, however we can configure APT so that you can retroactively remove any suggests you installed that you no longer want. This can be useful if you’ve installed many packages on a system and are unsure what packages were installed as suggests.
First gain root access at a terminal. Enter your user password when asked.
user@devuan:~$ sudo -s
Use an editor to make the necessary changes.
root@devuan:~# nano /etc/apt/apt.conf.d/01lean
Add the following lines.
``` APT::Install-Suggests “0”;
APT::AutoRemove::RecommendsImportant “false”; ```
Use Ctrl + X to save.
Many recommended packages are not of an important nature, but this is not always the case. Therefore it is necessary to protect important packages from being removed in the process.
For example on any system using either a web browser such as Iceweasel or any program relying on external SSL certificates, you will want the ca-certificates packages available to provide that functionality.
We will now use apt-get to mark these packages as being manually installed so they are protected from removal.
root@devuan:~# apt-get install ca-certificates isc-dhcp-common
Now all we need to do is retroactively remove the packages we have opted out of.
root@devuan:~# apt-get autoremove --purge
The now orphaned recommends and suggests will be removed, debloating the system of them including any relevant configuration files. Be sure to make notes of any packages that you want to keep as you can install these manually later.
Since you have removed some packages from the system, you no longer need archives of those packages and they can now be cleaned out of the package cache to reclaim some disk space.
root@devuan:~# apt-get autoclean