There's never enough space on your iPhone or iPad, especially when you need it most. Before you travel or record a long video, it's best to check the available space on your iOS device.
How to check how much space is left free
To determine the free space on your iPhone or iPad, open the Settings app. Tap General, then select "iPhone storage" (or "iPad storage" if you're using it).
The used space is displayed on your iPhone or iPad. To find the available space, subtract the used space from the total storage capacity. For the screenshot below, that would be 64GB minus 22GB, which equates to 42GB of available space.
The diagram gives a visual overview of the usage of the storage space.
How to Free Up Space
You have no room on your iPhone or iPad? There are several ways to free up disk space. You may know the usual suggestions: delete photos and apps.
If you have already done so (or do not want to restrict your photo library), try the following options.
Enabling iCloud Photos
iCloud Photos uploads all photos and videos to iCloud and automatically deletes old media from local storage. This process only occurs when space is at a premium and you can re-download content from iCloud at any time.
To enable this feature, open the Settings app, go to the Photos section, and enable iCloud Photos (for iOS 12 and below, iCloud Photo Library will be displayed). Next, make sure the Optimize iPhone Memory option is turned on (this will erase old media as needed.)
iPhone or iPad users who have the basic storage option and simply enable iCloud Photos (iCloud Photo Library) can solve most disk space issues (assuming you have enough space in iCloud Drive).
Automatically swap out unused apps  If you're using iOS 12 or later, the "Unavailable apps swap out" option appears just below the storage space graph on the iPhone / iPad storage screen.
Once enabled, iOS automatically deletes older apps that you have not used for a while. Only the app will be removed and the app data will not be touched. If you download the app in the future, your data will be available again.
Deleting an app or app data
Below the locale chart, you'll find a list of the most space-consuming apps (sorted by the largest apps above). Tap an app to see the space distribution between the app and the app data.
From here, you can tap "Swap App" to outsource only the app (and not touch the app data). You can also tap "Delete app" to delete the entire app along with the app data.
There will be times when the app's data take up much more space than the app itself. This is most common with podcast apps, music apps and audiobook apps the case. In this case, you should open the app and delete the downloaded data to free up space.
Optimizing the iCloud Music Library
If the Music app appears at the top of the app list in the Memory area, look in the iCloud Music Library memory optimization feature. Offline downloads of Apple Music are limited to a few gigabytes.
To set up, open the Settings app and go to the Music section. Make sure "iCloud Music Library" is turned on and navigate down to find the "Optimize Storage" option. Tap on it and switch the function on the next page.
In the Minimum Memory section, choose how much music you want to keep on your iPhone or iPad at all times. If you select None, Apple deletes all music when it runs out of storage space and needs it for other features (for example, when recording a 4K video). In addition, you can also select the option 4, 8, 16 or 32 GB.
Check your disk space about every month. If you find you're running out of memory, turn on iCloud Photo Library, Optimize Memory for Apple Music, and Unload Unused Apps to automate disk space purge.