I'd like to free up some storage space and delete attachments from most/all the messages in my Gmail. I've long since downloaded and used any attachments I need or care to keep. How can I delete attachments from Gmail, but keep the messages?

I've read this and this, but the first is a little old, and the second is too manual. (I have thousands of messages archived. Forwarding each one to myself would take forever.) I'm looking for a less manual/tedious solution.

How can I purge old attachments that do nothing now but take up space, and still keep the original, valuable messages?

  • I don't know exactly how to delete attachments and keep the messages, BUT you can use this service findbigmail.com that looks for big size attachments in your gmail account and you can delete the bigger ones. Hope this helps Commented Nov 4, 2013 at 0:53
  • Maybe techawakening.org/… or steffondavis.com/… but I haven't tried it as it seems tedious and potentially buggy (if you give it a try, you might prefer to experiment with it on a test account first). Commented Nov 4, 2013 at 1:17
  • 2
    @elunicotomas Thanks; if I need to find large attachments, I just do a search for size:nMB and has:attachment.
    – Matt
    Commented Nov 4, 2013 at 4:11
  • 1
    possible duplicate of How can I strip attachments in old GMail email?
    – Alex
    Commented Nov 4, 2013 at 8:27
  • 1
    This might be helpful: lifehacker.com/5984571/…
    – ale
    Commented Nov 4, 2013 at 13:54

4 Answers 4


I wrote an app called Unattach, which allows you to easily download Gmail attachments in bulk, and optionally remove them.

  • Hi Rok, when I run the jar, nothing happens. No window appears, nothing in the console. OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1~deb9u1-b13)
    – Jayen
    Commented Nov 16, 2018 at 23:56
  • @Jayen The new version of Slimbox (v1.7.0) should be easier to use, since it comes prepackaged with all dependencies. I hope that resolves the issue you describe. Commented May 9, 2020 at 12:19
  • @Jayen There should also be "Downloads". May be best to move this discussion offline. You can find my contact through the website above. Commented May 9, 2020 at 20:01
  • Thanks Rok, my screen isn't tall enough for your application, so if I maximize the window, I can't scroll to the bottom. I need to unmaximize and move the window up to see the bottom section.
    – Jayen
    Commented May 10, 2020 at 6:23
  • @Jayen I created a ticket for this issue: github.com/rokstrnisa/slimbox/issues/4 Commented May 10, 2020 at 14:19

I think that you just have to delete the message. If you need the message then you could copy the text and keep it in Google Drive. Or send yourself a email with the text, and delete the original.


IMAPSize is the perfect tool to do that.

And how you can use it : http://www.labnol.org/software/delete-large-email-attachments-in-gmail/9564/

  • This is 2018, seems IMAPSize always stuck on 15% then crash. Slimbox works better for me. Commented Aug 14, 2018 at 0:53

Try this Google Docs script, it worked for me. It does not require installing anything.

How does it work (description from the blogpost):

  1. You specify the size of the emails to be found in Megabyte.
  2. All emails with that or above that size are retrieved and shown.
  3. On select of delete all, those emails are processed.
  4. All attachments in the message are backed up in your Google Drive under the folder name Gmail_Attachments. So they will remain safe there you can refer them whenever needed.
  5. Copy of email body is created and it is sent as a new email to your account from your own ID. So is the time stamp and sender details of original message lost? No. They are fetched and appended to the new email copy. Details like date, from, to, cc are retained.
  6. Finally original email along with the attachments are trashed.

P.S. If you have already run out of space, #4 will not work (Drive will not allow uploading new files), but the attachments still will be accessible from your Gmail trash, so you can safely download them manually and only then empty the trash.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.