How to Delete Mailman Archives on cPanel Using a Command?

If you have created a mailman mailing list called [email protected] and want to clear it, you can refer to the following steps to remove the mailman archives on cPanel. 

1. Run the command given below – 

cd /usr/local/cpanel/3rdparty/mailman/archives/private

2. There will be many directories in this location; each directory contains a mailman email list with an example, such as [email protected], inside the directory listing_example.com.

drwxr-x--- 2 mailman nobody 4.0K Jan 10 2019 mailman/
rwxrwx--- 2 mailman mailman 4.0K Jan 10 2019 mailman.mbox/
drwxr-x--- 2 mailman nobody 4.0K Oct 25 2019 mail_mailing.com/
drwxrwx--- 2 mailman mailman 4.0K Oct 25 2019 mail_mailing.com.mbox/
drwxr-x--- 2 mailman nobody 4.0K Oct 25 2019 listing_example.com/
drwxrwx--- 2 mailman mailman 4.0K Oct 25 2019 listing_example.mbox/

3. Go to the listing_example.com directory. 

cd listing_example.com

4. List all the contents with the command given below – 

ls -alh

5. Run the below command if you want to remove all the archives of 2019. 

rm 2019* -rf

6. Database and attachments also consist the older data.
You can also remove it using the rm-rf command.

7. Run the command given below to clear the mailman cache. 

/scripts/update_mailman_cache



Was this answer helpful?

« Back

chat