When you delete data, it’s no longer accessible through the iPad interface, but it isn’t erased from iPad storage. To remove all of your content and settings from storage, erase iPad. For example, erase iPad before you sell it or give it away. If you want to save your content and settings, back up iPad before erasing it.
You can erase iPad from Settings . If you’re unable to open Settings, you can use a computer to erase iPad.
Erase all content and settings from iPad
Go to Settings > General > Reset.
Tap Erase All Content and Settings.
When iPad restarts with all content and settings erased, you have the option to set up iPad as new or restore it from a backup. See Turn on and set up iPad.
Use a computer to erase all content and settings from iPad
You can use a Mac or Windows PC to erase all data and settings from your iPad, restore iPad to factory settings, and install the latest version of iPadOS. For example, if you can’t open Settings on iPad, you can use this approach to restore iPad to factory settings.
Before iPad is erased, you have the option to back it up. If you make a backup, you can use the backup to restore your data and settings on your iPad or on a new device. See Restore iPad from a computer backup.
Do one of the following:
In the Finder sidebar on your Mac: Select your iPad, click General at the top of the window, then click Restore iPad.
To use the Finder to restore iPad to factory settings, macOS 10.15 or later is required. With earlier versions of macOS, use iTunes to restore iPad.
In the iTunes app on a Windows PC: Click the iPad button near the top left of the iTunes window, click Summary, then click Restore iPad.
Follow the onscreen instructions.
See the Apple Support article If you can’t update or restore your iPhone, iPad, or iPod touch.