This post has been updated. It was originally published on March 25, 2021.

Your phone’s messaging app can be a sneaky storage hog. Whether you’re using Messages on iOS or Google Messages on Android, your settings could be taking up chunks of your device’s memory. Changing them to delete message attachments is a quick way to free up space on your phone.

How to delete message attachments on iOS

Don’t be surprised if your Messages app is the second-largest on your phone—any pictures you send or proactively save are hanging out in both your photo library and Apple’s built-in messaging app.

To clear attachments out of Messages, open the app, tap on a conversation, and hit the info icon under the contact’s avatar. Scroll down and you’ll see one or more categories of attachments, suchs as photos, links, and documents. Tap See All on the category you want to clear out, hit Select in the top right, and tap on the ones you want to get rid of. Once you’ve selected the ones you want to trash, tap Delete in the bottom right, and confirm by touching Delete Attachment when it pops up.

It’s worth noting that the photo category is divided into All, Photos, and Screenshots, so if you want to target just one group of images, you can narrow the selection this way. Also, while messages sync across devices, deletions do not, so if you use Messages from your computer, any attachments you delete from your phone will still be available on your desktop or laptop.

[Related: Ditch your phone’s default apps for these superior replacements]

If you don’t want to go conversation by conversation, you can review large attachments in your iPhone’s settings. Open the Settings app, go to iPhone Storage, and select Messages. Tap Review Large Attachments, and you’ll see a list of files larger than 4MB. Hit Edit and tap on each one you want to delete, then hit the trash can icon in the top right to get rid of them. You can also swipe left on individual ones and tap Delete to send them to the trash.

On the same screen, you can also enable Auto Delete Old Conversations to automatically remove all messages and attachments you sent or received more than one year ago.

How to delete message attachments on Android

Android phones come with different messaging apps depending on their manufacturer, so we’ll just touch on the options for stock Android here.

Unlike Messages on iOS, Google’s Messages app doesn’t automatically save images to your device. You can toggle on an option to auto-download media messages into your Messages folder in the Files app, but this will only happen if you’re using cellular data, and you can disable the option entirely.

[Related: Save space on your laptop and in the cloud by compressing files]

To clear out your Messages folder, go to Files, Images (or Videos, depending on what you’re looking for), and then scroll to the left to find the Messages folder. Tap to open it and once you’re there, press on an image to activate selection mode and tap everything you want to trash. When you’re done, touch the trash can icon in the top right, and confirm by hitting Delete in the emerging dialog box. You can also bulk delete by selecting files by date.