Sort Gmail By Attachment Size

9
January 12, 2010 // Web

gmail-size

Update 3/19/2013 

You can now actually run a search for attachments based on size!  Approved operators:

  • size:5m - Find emails with attachments of 5M
  • larger:5m - Find e-mails with attachments larger than 5M

Suggested query: larger:5m older_than:2y

^ Will find all e-mails larger than 5MB and older than 2 years.


gmailattach

Gmail inbox getting full?  Mine was too.  For some inexplicable reason, Google does not allow you to run a simple search of your inbox where you can sort by attachment size.  There are some options to get your Gmail account under control, most useful of which is searching for particular file types.   Run a search for the most commonly large file types, and optionally add a date modifier so you only look at mail older than a certain date.

Enter this into the search box:
filename:(mpg OR mpeg OR avi OR wmv OR zip OR bmp OR mp3 OR wma OR mov) before:2010/12/31

Note: Change the “before” date to whatever date you want.  It can even be today’s date.

I did not exclude JPG or JPEG because pictures are often a useful thing to save.  I still recommend going through each e-mail before doing a mass-delete with the above search query, but this will at least give you a useful workaround while Google works on a sortable attachment filter.

Google is well aware of the need for this feature, but feel free to cast your vote on their suggestion page, like I did.

gmailsize2
Make sure to vote for Google to add this as an official function.

About the author

Co-founder, Managing Partner, Nutritionix.com

9 Comments

  1. Hi,

    Your suggestion does not seem to work on mine. Am i doing something wrong? I just typed “larger:5m older_than:2y” on the search box and NO email came out.

    PLEASE HELP.

    Thanks.

  2. @Eric — That’s just it, there is currently no way to sort by attachment size, but the assumption is that you want to sort by attachment size in order to clear out your inbox, so the instructions above will help you clear out your inbox of e-mail with unnecessary attachments. It’s the next best thing! In the meantime, you should submit your vote to help get this as a REAL feature on gmail as soon possible.

  3. The title of this article is “Sort Gmail By Attachment Size”.
    But, the article didn’t address how to sort by size AT ALL!
    Can that info be added, please?

  4. awesome code. thanks.

  5. Still only a suggestion… when will they implement it?

  6. Jacques Stern May 10, 2012 at 5:07 am

    Thanks for the tip! it worked very nicely.

  7. Yasser Mahgoub April 21, 2012 at 3:57 am

    Thank you Matt. This was very useful to free some space. Thank you very much.

  8. For $5 a year you can buy 25gigs of storage, so you dont have to delete old emails.

  9. Great tip. thnx!!!

Leave a Comment