There are nice attempts to resolve this automatically, but they all fail. A good example is IMAPSize, but I haven't found anybody who was successful with this tool.
Therefore I think there's still one solution to solve:
- Install Thunderbird E-Mail Clinet
- goto GMAIL web client, goto 'settings' and turn IMAP on, and check settings for deleting emails through IMAP
- Goto Thunderbird and add your Gmail account with IMAP acces to imap.googlemail.com / Port 993, username and passwort
- access then to your e-mails and chose 'all e-mails', click on the size column to get the largest e-mails.
- click once on the e-mail on top and check the details below. On the very buttom you can see the attachments where you have then the options to delete /all and extract / all.
- act as desired and very important - press the delete key - because thunderbird will create a copy of the e-mail without the attachments anyway and leave the original as it is! So if you don't press the delete-key both of the e-mails will remain there. One with and one without the attachment
- please consider your IMAP / delete - settings in the GMAIL web clients if you face any problems.