Have you ever had to frantically delete photos from your phone’s camera roll to make room for new ones? Us too. If you run up against your storage limit in Gmail, you won’t be able to send or receive new messages—a problem that’s just as frustrating.

Your Google storage allotment is shared across Drive, Gmail, and Photos, and there are a number of ways to make space from app to app. Messages and attachments (including those in Spam and Trash folders) are the big storage hogs in Gmail, so here’s how to find and delete those oversized attachments.

To start, type has:attachment larger:10MB in the Search box at the top of the Gmail window on your desktop or laptop web browser. This will turn up messages with attachments over 10 megabytes. Change the number around as needed (or save yourself a character by omitting the “B” in “MB,” if you want). You can’t search in GB, or gigabytes, but Gmail doesn’t let you send files that large anyway—you’re limited to 25MB of attachments in each message.

You can also use the size search operator, if you’d rather specify file sizes in bytes. Simply type size: and then a minimum number of bytes, such as size:1000000 (or 1MB). Here are a few examples, which you can click to see the results in your inbox immediately:

* Search for attachments greater than 5MB (size:5000000)
* Search for attachments greater than 25MB (size:25000000)
* Search for attachments greater than 100MB (size:100000000)

To free up storage space, select the messages you want to delete and click the Trash icon. Then, find your Trash folder on the left menu (you may have to select More > Trash depending on your inbox organization) and click “Empty Trash Now.”

You can see how much storage you have (and how much you’re using) if you scroll to the bottom of your inbox. Alternatively, go to your Drive settings to view how much space each app is using.