2

I have a script that has lots "sudo apt install ..." commands. While running the script I realized that it also installs postfix which I didn't specify. Is there an easy way to identify which package installs postfix?

Edit: OK. In my situation the "mailutils" package installs postfix as a virtual package with the name default-mta. aptitude why postfix gives the clue. Now I'm gonna use sudo apt install mailutils postfix- (note the dash) to install mailutils without installing postfix.

2 Answers2

2

If you don't have aptitude installed, you can try

apt remove postfix --simulate

  • Note the --simulate flag. Nothing will actually be removed.

and see what apt wants to remove that requires postfix.

user535733
  • 62,253
1

If you have aptitude installed, you can just do

aptitude why postfix

I don't have postfix installed, but when I run it on nullmailer I get

i   lsb-core   Depends  lsb-invalid-mta (>= 11.1.0ubuntu2) | mail-transport-agent
p   nullmailer Provides mail-transport-agent                                     
Organic Marble
  • 23,641
  • 15
  • 70
  • 122