My Gmail account is starting to get full, so I have been using the new search term larger:1M to find attachments that are larger than 1 Megabyte.

I'd like to just delete the attachment without losing the email itself?



You can access your Gmail account as an IMAP account using an email client such as Thunderbird or MS Outlook and then use the client’s feature for deleting attachments.

Also you can automatically forward the messages to yourself and remove the attachment with Google's Docs http://techawakening.org/delete-attachments-from-gmail-without-deleting-the-emails/1842/

  • 2
    This script does seem to work. It asks for scary permissions, but you can review the source script itself which is run within your own user account context, and it seems harmless, doesn't hit any outside URLs.
    – Jack Wasey
    Jul 30 '17 at 21:29
  • 4
    There's a bug in Thunderbird that prevents it from correctly deleting attachments from gmail emails: bugzilla.mozilla.org/show_bug.cgi?id=679619. Apple Mail works fine though (for macOS users).
    – jjs
    Apr 17 '19 at 23:55
  • @jjs The bug in Thunderbird you mentioned was reported 8 years ago. A lot of time has passed. Hope, this bag was solved in new version(s) of Thunderbird Apr 19 '19 at 2:08
  • 4
    @IgorIschuk the status of that bug is still open, and if you look at the comments you'll note people have posted recently and are still experiencing this issue. And of course I verified myself that the bug is still happening prior to posting here.
    – jjs
    Apr 19 '19 at 15:11
  • 1
    There's a medium article which talks about this too: medium.com/@mrodz/…
    – babelmonk
    Dec 19 '20 at 20:30

The Chrome extension Dittach is said to do this, but it is still unclear for me (I didn't find the answer on their website) if our emails' content and attachments - i.e. our personal data - transit via this 3rd party company's servers or not when using Dittach. As it could be potentially dangerous to open our data to a 3rd party company, I prefer not to use it, for now.

As mentioned in @IgorIschuk's answer, it is possible to remove attachments in emails (and keep the original text) by enabling IMAP in Gmail + Thunderbird, but the workflow is quite long.

Thus, here is a detailed workflow explaining how to mass remove attachments for, say, all the emails of your Gmail that have a size > 1 MB. In my case I had ~ 1050 such emails.

  1. First enable IMAP in Gmail's Settings. Also create a Gmail label named bigattachments, and configure it to be visible from IMAP.
  2. Install Thunderbird (tested with Thunderbird Setup 60.5.0.exe) and set up the Gmail account.
  3. In Thunderbird, go in All mail, right click on the columns, and enable the display of the column Size. Click on the Size column header to sort all your emails by size. Then select all the emails that have a size > 1 MB, and move them (with a drag'n'drop) to the bigattachments folder.
  4. Now create a local folder in ThunderBird named temp. Drag'n'drop to copy all the emails from bigattachments (IMAP, on distant server) to temp (local). This step can take a long time depending on the size of the data to be downloaded.
  5. Then install the addon AttachmentExtractor Continued (the original addon AttachmentExtract doesn't work on Thunderbird 60 anymore).

  6. Now select all the emails in the local Temp folder. Right click, select "Extract attachments", select a destination path for the attachments. Wait. Carefully check that the attachments are removed from the emails (you can check the Size column), and that they are saved in the destination path too.

  7. Now go to Gmail's web (https://mail.google.com/mail), go to Settings, temporarily switch to Conversation mode off, Save settings. Go to the bigattachments label. Check that the number of emails here is equal to the number of emails you processed in Thunderbird. (Note: if you don't switch to Conversation mode off, you won't be able to see the right count of emails, you would get a count of conversations instead!). Now delete all these emails in the bigattachments label. This is scary the first time, but it works. Wait a few minutes, refresh Gmail web, and enjoy the change from 5 GB of 15 GB used to 1GB used :)

  8. Go back to Thunderbird. Select all the emails in the local Temp folder. Drag'n'drop them back to the bigattachments label (IMAP). Wait for the upload.

  9. It's done! You can check on Gmail web that the bigattachments contain the same emails, but with attachments removed. You can now do the cleanup: a) Remove this bigattachments label (removing a label doesn't delete its emails), b) Go back to Conversation view on, c) Delete the Thunderbird's Temp local folder, or even remove Thunderbird.


  • For me AttachmentExtractor Continued worked for normal attachments, but not for "inline images" (even if I checked Also extract embedded 'inline' images too), maybe this feature is not working yet. I you have a solution for this, please drop a comment.

  • Why copy the emails to a local folder Temp, extract the attachments there, delete the original emails in Gmail, and move the content from Temp back to Gmail? This seems unnecessarily complicated, and we could think "Let's apply AttachmentExtractor Continued directly to the bigattachments IMAP folder"! Short answer: the latter doesn't work, already tested! This is due to a Thunderbird bug.

  • If you only have a few emails to process (less than 10), it's not necessary to install the addon AttachmentExtractor Continued. You can skip step 5 and 6, and just click on every email of the Temp folder, and click on the bottom right part of the screen (I don't remember the name of this option, maybe it's in More...), you have a Detach feature. The only drawback is that this cannot be done for multiple emails at the same time.

  • Don't forget to do enable "Delete the attachment from the message" in the Tools > Addon options > AttachmentExtractor menu. If not, the attachments won't be removed from the emails! I don't know which of the 3 options is the best (normal Thunderbird code vs. Delete with AE's internal routine vs. Detach with AE's internal routine; BTW does anyone know what is the difference between the 2 last ones: Delete vs. Detach?), though.

    enter image description here

  • 3
    This sounds cool, I have to try it! The way TB natively detaches attachments is quite cool. It leaves behind an <1KB file with the same name (text file). So when you go back to Gmail you can see that there was an attachment and what it was called. Nov 17 '19 at 10:45
  • 1
    Amazing! Thanks a trillion!
    – Dan Z
    May 12 '20 at 13:34
  • 2
    I'm surprised this answer doesn't have more upvotes. The Thunderbird bug described in the comments to the 1st answer seems to be the standard behavior of all IMAP clients (I also tried Outlook and IMAPSize, they also just create an additional copy of the email, leaving the original with the attachment in place). I was about to give up and pay Google for more space, when I found your answer.
    – Dan Z
    May 12 '20 at 14:55
  • 1
    @Basj I don't see releases between 68 and 78 being available for download: thunderbird.net/en-US/thunderbird/releases. Looks like none of them went past a beta stage: en.wikipedia.org/wiki/History_of_Mozilla_Thunderbird. I guess 68 is what we should use then?
    – haridsv
    Jan 10 at 4:42
  • 1
    @haridsv In fact, I only use Thunderbird once a year to do this process. So even a good old Thunderbird 60 does the job perfectly.
    – Basj
    Jan 10 at 12:50

I wrote an app called Unattach, which allows you to easily download and optionally remove Gmail attachments from many emails at once.

  • 1
    Just tried on 4 emails and it worked beautifully. Thank you for making such an app!
    – qwertzguy
    Jun 24 '20 at 6:31
  • 1
    Confirmed, works flawless. Adds a few lines of details to the mail about the attachments that are removed
    – Jogai
    Jun 29 '20 at 20:30
  • 1
    Terrific work, Rok. Flawless OAuth, search/filter, downloading, and breadcrumb insertion -- all without mucking any of my Gmail labels. Aug 5 '20 at 4:50
  • 1
    Big fan of Unattach! Freed up a couple hundred MB of Google storage :)
    – ggambett
    Jan 9 at 12:18
  • 1
    I just bought this app, and I find it well designed and quite effective at doing what it's for. The developer is also very responsive on Github.
    – David Ebbo
    Jul 6 at 19:27

You can't delete an attachment in Gmail without deleting the email it is attached to. You can forward the message to yourself and manually remove the attachment before hitting send. Then you can delete the original message. Just be sure to use the delete option on that message and not for the entire conversation.

Personally I don't recommend using Gmail as an archive solution. If you are using Google Apps, the enterprise version of Gmail, the message could be expunged by a company policy at any time. If your Gmail account is compromised the messages could be deleted by the attacker.

If the data is important, create a Google Doc and paste the information in it. You can now share this info with others should you wish to share or collaborate on it.

  • 1
    And what do you base this conclusion on? If you can prove it's wrong, please show your reference(s) and I'll be happy to edit or remove my answer.
    – Folk
    Mar 25 '19 at 15:24
  • Based on what is posted in the accepted answer (that can be taken as a reference), as one option I am familiar with. That is what I used quite a few years ago. Perhaps you mean that you can't remove an attachment from a web browser... If so, it would be good to mention it explicitly. Mar 25 '19 at 16:09
  • 1
    I think I see what you mean, but this is the 'web applications' Stack Exchange and the questions was about GMail. I'm addressing the question in the context it was asked. The accepted answer you reference provides a workaround that involves installing a local (non-web application) email client. So the answer I gave, that you can't accomplish this in Gmail itself, is still accurate.
    – Folk
    Apr 9 '19 at 13:56
  • 1
    Well, this is an "edge" case... Gmail is per-se web based, but there are non-web based interfaces that interact with it, so there is likely no clear-cut classification of the accepted answer as a "workaround". Indeed, the question (rephrased to make it a question) is "Can I just delete the attachment without losing the email itself?" It does not ask "Can I just delete the attachment from within Gmail without losing the email itself?" Apr 9 '19 at 21:54
  • It's already a question: "Can one delete a Gmail attachment but keep the email?" so to me that means within Gmail. If the question were just about how to delete an attachment from any email, well then I don't think it would be in the Web Applications stackexchange. The nature of the question including the word Gmail and being tagged with Gmail indicates the question is about solutions within Gmail.
    – Folk
    Apr 11 '19 at 17:42

The Chrome extension Dittach promises to be able to delete individual attachments.

A short description/review is available at ZD Net.

  • 2
    Are the emails processed on Dittach's own servers (i.e. email content + attachment) or is everything done on client side with no data at all transiting on Dittach's servers? Also what kind of permission does it require? It's always scary to give permission to our mailbox to a company like Dittach that could potentially be hacked (probably much easier than Gmail themselves...)
    – Basj
    Feb 8 '19 at 14:03
  • 2
    Dittach no longer working as of Jul 2019 - seems like company folded? Aug 2 '19 at 20:36

The ability to delete the attachment from an email, without deleting the email itself is one of the annoyingly missing Gmail's feature. You can't do this from the Gmail user interface. You can achieve this though, by programmatically modifying the emails using Gmail API. This is exactly what I did. I created a simple tool that you can use to extract attachments from emails - feel free to check it out:

Gmail Attachments Extractor 📤

  • Works perfectly! This script helped me process 31,000 emails. It's a little tedious to set up the authentication in google cloud portal, but that's not the author's fault. The script's output is fantastic, the instructions are complete, and the functionality is great. The image based auth walkthrough was especially thoughtful given that it's not really the author's problem, but it is the main onboarding challenge for the script. The author even correctly recommends a security cleanup process of revoking the tokens you grant in order to execute the script. Kudos! Thanks Tomasz!
    – SimplGy
    Jun 29 at 16:28

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