My Gmail account is starting to get full, so I have been using the new search term larger:1M
to find messages containing attachments that are larger than 1 Megabyte.
How do I delete only the attachment without deleting the email itself?
Yes.
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. See Delete only Attachments in Gmail without Deleting the Emails using Google Docs
I created Unattach, a web app that lets you mass delete Gmail attachments without deleting the email. You can also download attachments, resize image attachments, remove duplicate attachments in threads, or upload attachments to your own server or Dropbox.
(2022 Update in the edit below)
A Chrome extension was said to do this, but it was 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 it. As it could be potentially dangerous to open our data to a 3rd party company, I never used it.
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.
First enable IMAP in Gmail's Settings. Also create a Gmail label named bigattachments
, and configure it to be visible from IMAP.
Install Thunderbird (tested with Thunderbird Setup 60.5.0.exe) and set up the Gmail account.
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.
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.
Then install the addon AttachmentExtractor Continued (the original addon AttachmentExtract doesn't work on Thunderbird 60 anymore).
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.
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 :)
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.
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.
Notes:
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.
Update 2022-07-29
No.
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.
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:
The Chrome extension Dittach promises to be able to delete individual attachments.
A short description/review is available at ZD Net.
Basj's answer here is a good approach. My answer is a modified version, which only works for macOS, because Basj's answer suggested that I might need to install an old version of Thunderbird, which I didn't want to deal with. Instead, I used macOS's Mail program. The difference between Mail and Thunderbird for this use case is that Mail can remove attachments from many emails at once, but Thunderbird needs an extension (AttachmentExtractor Continued) to do it for more than one email at a time, and the extension has historically not always worked with the latest version of Thunderbird. That said, I don't see a way for Mail to extract the attachments (rather than just delete them), so if you want the attachments themselves extracted to a local folder then you might need to make Thunderbird work.
Conversation mode off
, Save settings
" so that you can be sure you're dealing with just the emails for which you want to remove attachments, not other emails in the same conversation threads. (b) "Enable IMAP in Gmail's Settings. Also create a Gmail label named bigattachments
" and fill it with the emails for which you want to remove attachments.bigattachmentsRemoved
. For now, it is empty.bigattachments
are synced.+
to create a new local mailbox named temp
. This is analogous to creating a local folder in Thunderbird in Basj's answer. It should only exist on your Mac; you shouldn't see it in the Gmail web interface. Select all the emails in bigattachments
and copy them to temp
.View
-> Show Message Size
. This is important to be able to recognize when attachments have been successfully removed, because Mail can take a long time to do that for many messages, and doesn't show a progress bar!temp
, then Message
-> Remove Attachments
. This might take a while, and the only indication that it is finished is when the displayed size decreases.temp
and copy them to bigattachmentsRemoved
.bigattachmentsRemoved
to sync. Compare them to the emails in bigattachments
; they should match except that attachments should be missing or replaced with "empty" attachments.bigattachments
.Trash
. Go there, review the items, then click Empty Trash Now
to reclaim the storage space.temp
and the Gmail labels you created.For background, the reason why both of versions of this approach (Thunderbird and Mail) involve removing attachments from local copies, deleting the originals, and uploading the modified copies is because Gmail won't let you directly remove an attachment from the original. Gmail will just add a new email and keep the original (with attachment) if you try to do that.
bigattachments
and bigattachmentsRemoved
flags, so now it is easy to recognise them as problematic and decide what to do with them. (In my case these are all old bank emails with PDFs attached, so I can just delete them all)