How to completely erase Postfix
I install Postfix on my Ubuntu server 18.04
I modified the configuration of the file /etc/postfix/main.cf
I made mistakes and I want to restore the original file. So I uninstalled Postfix :
$ sudo apt remove postfix && apt purge postfix
$ sudo autoremoveWhen I install Postfix again, the installation does not ask the questions like on the first installation. I still have my previous configuration. Why can not I reset the Postfix configuration ?
If I reconfigure Postfix, I still have the previous configuration :
sudo dpkg-reconfigure postfix 5 1 Answer
To completely remove the package and all its configuration files:
sudo apt purge postfixYou can check if it's uninstalled by checking if the service is running:
systemctl status postfixIt then should say:
Unit postfix.service could not be found.You can then reinstall it.
3