You and your pals might love sending holiday photos and funny GIFs in your favorite chat app, but all that media will soon rack up, especially if you’ve had the same device for a long time. Do you really need to keep those cat videos your colleague sent 18 months ago, or the dozens of screenshots from the time you helped your great aunt get to grips with her new iPad?

To stop wasting precious storage space on your device, a regular purge of photos and videos can work wonders. Here’s how to bulk-delete media attachments from each of the three major chat apps.

Messages

The built-in Messages app is home to iMessage, and it’s probably home to a load of hidden media, too. You can find out how much the Messages app is carrying by launching the Settings app, tapping General, and heading over to iPhone Storage.

Here, your iPhone should present “recommendations” to you – one of which will likely be to Review Large Attachments. Usefully, the Settings app can figure out where large attachments – like photos or videos – are hiding, and will give you the option of deleting them en masse. This method is perfect for removing the biggest offenders from the Messages app in one fell swoop.

You can see how “heavy” any iOS app is using the same interface.

Facebook Messenger

Messenger, the standalone app from the folks at Facebook, is a tricky customer. Offloading bulky attachments isn’t so simple – you can remove individual pieces of media from message threads (by holding your finger on the photo or video), or, if you aren’t bothered about keeping your message history, entire threads can be deleted from the app’s main interface.

However, you can clear Messenger’s entire media cache (and offload saved content) by deleting and reinstalling the app from the App Store. Your chat threads will still be there when you log back in, but the media associated with them will no longer be stored locally.

On top of this, it’s worth calling by the app’s Data and Storage sub-menu from inside Messenger’s settings page, and checking that the app isn’t configured to automatically save photos and videos to your iPhone. Here, you can also stop Messenger from automatically downloading media sent to you in threads.

Messenger doesn’t offer the best options when it comes to bulk-deleting attachments, but there are a few avenues to choose from.

WhatsApp Messenger

WhatsApp, fortunately, offers a few more options. In the app’s settings, users can clear the content of all WhatsApp chats in the Chats sub-menu. Here, you can also disable the app’s Save to Camera Roll feature, which sees WhatsApp rather annoyingly auto-save all incoming media to your Photos app.

Finally, you can purge specific photos or videos from threads by tapping on the thread name, choosing Media, Links, and Docs, and then deleting media from there.

You can clear all chats in one go, or handpick the images and videos you’d like to get rid of.

If you leave your messaging apps alone, they’ll bloat up in no time. Be sure to follow these steps to take control of your iPhone’s storage space and clear out attachments from your device.