How to remove / Uninstall postfix from Ubuntu

remove / Uninstall postfix from Ubuntu, How to remove / Uninstall postfix from Ubuntu, GTechHub

Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail.

To remove postfix package completely from your Ubuntu server, follow the instruction below:

Step 1: Uninstall postfix and it’s dependent packages

To remove the postfix package and any other dependent packages which are no longer needed from Ubuntu.

sudo apt-get autoremove postfix

Sample response:

root@gtechhub:~/zcs# apt-get autoremove postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'postfix' is not installed, so not removed
The following packages will be REMOVED:
  libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common
0 upgraded, 0 newly installed, 5 to remove and 48 not upgraded.
After this operation, 5,652 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 888802 files and directories currently installed.)
Removing libmailutils5:amd64 (1:3.4-1) ...
Removing libgsasl7:amd64 (1.8.0-8ubuntu3) ...
Removing libkyotocabinet16v5:amd64 (1.2.76-4.2) ...
Removing libntlm0:amd64 (1.4-8) ...
Removing mailutils-common (1:3.4-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@gtechhub:~/zcs#

Step 2: Purging postfix

If you wish to delete all local configuration and/or data files of postfix package from Ubuntu then execute the below command in terminal:

sudo apt-get purge postfix

or

sudo apt-get autoremove --purge postfix

PURGED CONFIG/DATA CAN NOT BE RESTORED BY REINSTALLING THE PACKAGE.

Sample response:

root@gtechhub:~/zcs# apt-get purge postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  postfix*
0 upgraded, 0 newly installed, 1 to remove and 48 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 888680 files and directories currently installed.)
Purging configuration files for postfix (3.3.0-1ubuntu0.2) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for rsyslog (8.32.0-1ubuntu4) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
root@gtechhub:~/zcs#

remove / Uninstall postfix from Ubuntu, How to remove / Uninstall postfix from Ubuntu, GTechHub

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *