I have over one milion emails in my inbox in GMail, is there a way to delete them all without doing it 50 by 50 in the UI?

@jeena @selea better to let a program take its time while you do other stuff, then having to do it manually

@opal @selea ah, perhaps there is some code available on GitHub which can do that?

@opal @selea yeah but there I would need to download one million emails with attachments before I can delete them, and then I would need to mark one million emails, I don't think they're made for that.

@jeena @selea i havent used gmail much lately so im not sure if theres an in-house way of deleting all mail from inbox... perhaps setting up a filter to delete all messages from inbox, then disabling the filter afterward, or something like that

just looked online actually, try searching "is:inbox" and see if it gives you an option to select all results and delete

@opal @selea so there seems to be a way theoretically but when I do it it runs for some time and then it says "oops something went wrong" and it just moves 400 emails or something like that to the bin.

@jeena @selea seems like its overall just difficult to deal with lol

i remember having issues moving my gmail stuff over to another account, ended up just exporting a mbox file instead of trying to use imap. hopefully you find a solution that actually works and doesnt error out

@opal @selea yeah, there seem to be apis and libs so I can write something which runs slowly

Enable IMAP and use Thunderbird or other email client to delete them all at once

@nikolal I don't think Thunderbird will be able to hold over 15 GB of the emails in ram so I can select them on my 16 GB RAM laptop.

@nikolal I guess I'm looking for a more automated way, I think I'll try my luck with the gmail API and a python script.

That might work, but I guess their API also limits you to some degree

@nikolal might be, but if so then I'll try my luck with a IMAP lib ^^

Lol, you can just make that gmail account to forward your emails to new email account, I recommend switching away from google. With that you have empty inbox and you can see all new incoming mail

@nikolal I don't need the email account, I need the space for google drive

@jeena Enable pop3 access and install thunderbird?

@silver I would guess that Thunderbird won't be able to handle selecting one million emails, let alone processing the deletion.

@cjk101010 no, I just have an old account for the house in Poland where it send about 1k emails with attachments from the CCTV cams per day for years and I never deleted it, now I want to use the 15 GB for google drive instead to store video of movement from monionEye offsite on that account but it's full already ^^

@Xjs I fear that they don't release the username for quite some time after you delete it

@jeena Maybe a python script that interacts with the smtp server would work.

Though I don't really have experience with python and smtp.
@jeena meant imap instead of smtp of course 🤦‍♂️​

@jeena There might be something important in there. Check the spam folder too.

Sign in to participate in the conversation
Jeena's is one server in the network