Tenho notado que instalar o sendmail e depois desinstalá-lo, usando o apt-get, deixará muitos arquivos indesejados para trás.
sudo apt-get install sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
liblockfile-bin liblockfile1 make procmail sendmail-base sendmail-bin
sendmail-cf sensible-mda
Suggested packages:
make-doc sendmail-doc rmail logcheck resolvconf sasl2-bin
Recommended packages:
default-mta mail-transport-agent fetchmail
The following NEW packages will be installed:
liblockfile-bin liblockfile1 make procmail sendmail sendmail-base
sendmail-bin sendmail-cf sensible-mda
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 2256 kB of archives.
After this operation, 5263 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Então nós instalamos o sendmail - 9 novos pacotes e 5.2MB.
Minutos depois, mudei de idéia e queria desinstalá-lo. Não tem problema, apt-get me cobriu, certo? Limpar (excluir arquivos de configuração de pacotes e pacotes):
sudo apt-get purge sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
procmail sensible-mda
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
sendmail*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 219 kB disk space will be freed.
Do you want to continue? [Y/n] y
Em seguida, autoremove (remova as dependências de pacote instaladas automaticamente)
sudo apt-get autoremove sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'sendmail' is not installed, so not removed
The following packages will be REMOVED:
procmail sensible-mda
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 550 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 24702 files and directories currently installed.)
Removing sensible-mda (8.14.4-8+deb8u1) ...
Removing procmail (3.22-24) ...
Processing triggers for man-db (2.7.0.2-5) ...
Isso é 219 + 550 = 769KB recuperado! Acabei de perder 4.algo MB de espaço? Para quê?
Ao olhar atentamente para a saída, parece que o apt-get removeu apenas 3 do pacote anteriormente instalado automaticamente. O pacote sendmail-base, por exemplo, permanece:
sudo apt-get remove sendmail-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
sendmail-base sendmail-bin
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 2464 kB disk space will be freed.
Do you want to continue? [Y/n]
Então, há um pouco do meu espaço desperdiçado.
Mas por que essas dependências instaladas automaticamente ainda estão instaladas?