Google provides 15GB of free storage with every account, but that space is shared across all Google products. That means Gmail, Google Drive, Google Photos, and various other services can all be contributing to your used space. On top of that, it can be hard to tell what exactly in Gmail is using up all your storage.

Thankfully, it's incredibly easy to check which messages are filling up your storage, if you use Gmail's built-in search function. We'll show you how to clean up your Gmail storage in just a few steps.

Check the damage

First, it's important to see how much space Gmail is actually taking up compared to the rest of your Google services. Go to in your browser to see the breakdown for each Google product.

If you're using a G Suite account, you'll probably be taken to the Drive storage page instead. If so, you have to click the 'View details' link on the page to see all the details.

If you've confirmed that Gmail is eating up a significant amount of storage, keep on reading.

Delete junk mail

You probably have a lot of messages in your inbox from retailers, mailing lists, and other sources that are no longer useful (or weren't useful in the first place). There's an easy way to check for emails that were sent out automatically — do a Gmail search for "unsubscribe" with the quotes. This will bring up every message with the word unsubscribe, which mailing lists usually include at the bottom of messages.

By default, Gmail attempts to sort emails from retailers, mailing lists, and other automated lists into the 'Promotions' tab. If you want to include messages that Gmail thinks are promotional emails, add "OR category:promotions" (without quotes) to your search, like in the below screenshot.

If you're on the desktop Gmail web app (as opposed to the mobile app), you can click the checkbox in the top bar to select all messages at once, then move them all to the trash. After you click the checkbox, you can optionally click the 'Select all conversations that match this search' and then the trash button to delete every single matching message.

After you're done wiping them out, open the Trash folder in the Gmail sidebar (you might have to click 'More' in the sidebar first), and click 'Empty trash now.' Now check your storage dashboard again and see how much space was recovered. If you still need more room in your account, there are a few more ways to clean up storage.

Delete large attachments

Emails with large attachments, either sent or received by you, can also be taking up a significant amount of space. Open Gmail on your phone or desktop, and do a search for "size:5m" (without the quotes). This will display all emails that are 5MB or larger in size.

Here you can look at each individual message, and delete the ones you don't need to keep around. You can also just select all of them and move them to the trash in one scoop, just like with the junk mail, if you're not worried about losing whatever information is stored in the attachments. Again, make sure to clear your Trash once you're done.

Delete old emails

If you don't care at all about keeping ancient emails around, Gmail also makes it easy to delete all messages sent before a given date using the "older_than" search operator. For example, if you search for "older_than:1y" (without the quotes), you'll see all your emails older than 1 year old.

You can change the number of years by editing the number before the "y." Gmail also supports searching by months or days by using "m" or "d" instead, respectively.