Being able to run the script in the background, I managed to cleanse almost 22k emails in a 4 hours period of time. Although not the best tool available, the fact it is open source and free, makes it the best option for my own case.
Download the tool from Github
Make use of the following command to download the source code from the official repository.
git clone https://github.com/marin117/Gmail-deleter.git
How to setup the script on your own machine
Having tested the tool with Python 2.7, I have come to the conclusion that such version of Python is the right one for setting up the environment. As for the dependencies, a virtual environment is required. The following command can help you to setup a fresh virtual environment inside the project's root.
virtualenv -p /usr/bin/python env
Then install the requirements with the help of the following command.
pip install -r requirements.txt
Once you have managed to successfully install the requirements on your own machine, then comment the following lines.
#import matplotlib.pyplot as plt # on google_client.pyThe last thing is to enable the Gmail API and save the credentials.json inside the project's root directory.
#import matplotlib.pyplot as plt # on gmail_deleter.py
Once you have downloaded it, save it inside the project's root directory. Such step is required for the authentication. Now you are ready for the purge.
Purge your gmail inbox
The initiation of the purge is as simple as typing the following command while being inside the project's root directory.
Once the above command is being executed successfully then the following will come up.
Choose the first option as shown below.
And let the purging take place. Enjoy the script in the background while working on your daily tasks.