You pull out your phone to snap a spontaneous photo…and get an error message because you have no space for the image. Running out of room on your phone—with no memory left for photos or videos, new apps, or data for your existing apps—can be a disaster. To avoid this scenario, free up some space with these tips.

 Move your photos and videos to the cloud

Google Photos

Google Photos can delete images once you’ve backed them up.

Photos and videos can take up a huge chunk of the space on your device, so it’s a good idea to get these files offloaded to the cloud at the earliest opportunity. The good news is that plenty of apps will do the job for you—but the not-so-good news is that you’ll probably have to pay a few dollars a month to store your pictures and clips.

One of the best options is Google Photos. Not only does it work across Android, iOS, Windows, macOS, and the web, it also lets you store an unlimited number of photos and videos for free—as long as you don’t mind your images being resized down to a maximum of 16 megapixels and your movies being resized down to 1080p full HD (so no 4K). If you do want to store your files in full resolution, you’ll have to pay for the service.

iCloud keeps your photos synced across Apple devices.

Other paid options include Apple’s iCloud (which will not work on an Android phone), Microsoft’s OneDrive, Amazon Photos, and Dropbox. They’ll all save your mobile pictures to the web for a few dollars a month. Check the individual sites for the latest prices, though the tiers are similar across all the competing products: You’ll typically pay about $10 a month for 1 TB of online space.

Whichever option you select, your app of choice will automatically take care of uploading your photos and videos. You can then delete the local copies—some apps, like Google Photos and iCloud, will even take care of this for you—which will open up extra storage room on your phone. For more details, check out our complete guide to cloud-based photo backups.

 Cut down on apps and games

iOS storage

iOS and Android will tell you what’s taking up room on your phone.

The next-biggest space hog, after photos and videos, will likely be your apps and games. To avoid completely running out of room, regularly remove apps you’ve not using. Remember, you can always re-install them later without paying a second time—Apple or Google will keep track of what you’ve already paid for.

Of course, when it comes to space, not all apps are equally greedy. To see which ones are taking up the most room, iOS users can go to Settings, then General, then Storage & iCloud Usage and tap Manage Storage. On Android, open Settings, then Storage, then tap Apps. Then delete the worst offenders: On iOS, tap and hold on an app icon until it starts to shake, then tap the small x icon; on Android, tap and hold on an icon in the app drawer, then drag it up to the Uninstall link at the top.

Netflix downloads

Music and movie apps may have downloads you can wipe.

On top of the room that apps themselves take up, many of them also store data, primarily music, podcasts, movies, and TV shows that you might have saved locally for offline use. Whatever apps you use, they should include options for clearing out locally stored files so you can free up some space, though the process will vary from app to app. In Netflix, for example, tap My Downloads from the menu to see all the content you’ve saved.

Other apps—like Facebook, messaging apps, and browsers—will also store data, but not in significant amounts. So it’s not as important to keep tabs on how much space they’re using up. As we mentioned above, the apps list inside Settings on your phone is a good place to check, and you can always completely uninstall bulky apps.

Add extra storage

MicroSD card slot

Many Android phones let you expand your storage with a memory card.

The previous tips will help you clear out files on your phone. But what if you want to keep those files for easy offline access? In that case, you’re going to need more storage capacity. Sure, we could tell you to buy a phone that has more than enough storage on board—the iPhone goes up to a whopping 256GB these days—but not everyone has that kind of money. Besides, if you’ve already bought the phone you plan to use for the next few years, you’re not going to run out now and buy a more capacious one.

For Android users, there’s another option. Many Android phones come with a microSD card slot, which is a quick and easy way of getting more elbow room for your files and apps. By inserting this card, you can add 128GB of extra space for less than $50. Before you purchase, however, double-check that the card will work with your phone.

How your Android phone “sees” the card will vary depending on which manufacturer made your phone and which version of Android you’re running. Some phones let you run apps on the card, while others limit you to keeping your photos and videos on the extra storage. Even if it’s the latter, moving those files will free up room in your phone’s internal memory.

You can add extra storage to an iPhone too, but the solution isn’t as neat.

iPhones don’t feature expandable internal memory, but you can buy extra peripherals, like the SanDisk iXpand, to boost the available storage. These dongles are effectively automatic backup solutions that pull photos and videos off your device so you can delete the originals: They can be useful, but you’re not actually expanding the available space on your phone like you are with an Android’s extra memory card.

 Regularly reset your phone