How to delete all iOS Mobile Applications in iTunes except ones being used? I have many gigabytes of old iOS applications on the computer, which originate from my iPhone/iPad that are synced to the computer.

These applications are visible in the main roll-down menu in iTunes 12.5.1 under Apps, and on the macOS hard drive in ~/Music/iTunes/iTunes Media/Mobile Applications as .ipa files.

I know that iOS apps that are still available in the App Store can be re-downloaded if they've once been purchased (free or not), but that withdrawn apps can only be restored from the aforementioned iTunes library.

I do not care about keeping backups of apps I don't actively use – and I don't keep on the devices any old apps withdrawn from the App store – so I would like to delete everything and then restore apps that I currently use on my iOS devices.


What is the best way to delete all the applications and then restore them? If I delete them in iTunes, will syncing my iOS devices recreate the currently used applications again?
If so, is that done by backing up the application from the device, or downloading it onto the computer from the iTunes "app" store – thereby not backing up the app data itself (assumingly, this is something that is done within the iOS device backup in iTunes, not in the App tab)?




Note: The question is not about how to delete Mobile applications (this can be done by right-clicking the apps in the roll-down App view in iTunes, but not under the App tab under the iOS device view). The question is about how to purge unnecessary Mobile Applications from the Mac.
Apparently (based on a comment on my answer in the question you linked), syncing a device with iTunes no longer transfers purchased apps from the device to the computer.

There is no automatic way to "restore" all apps that you want into your iTunes library. Each one would need to be re-downloaded through iTunes. From the Apps section of iTunes, if you go to the App Store tab, there is a Purchased link on the right-hand side a few items down. From there just click on the cloud with the down arrow in the corner of the icon for each app you want to re-download. you can sort that list alphabetically using the Sort drop-down toward the upper-right.

I don't know if there's an easy way to get a complete, alphabetical list of all 3rd-party applications installed on your device. Settings > Cellular will show you a list, but I don't know if it's complete. (I think it should be, though.) Settings > scrolling down past Apple settings will show you a list, but I believe it's only apps that have permission requests built-in, or something exposed for the settings app; I don't believe it's everything. Settings > General > Storage &amp; iCloud Usage > Storage > Manage Storage will definitely show you a complete list, but it's not alphabetized. 

You are correct that, even when apps were copied from the device to the computer, user data was not included as part of that. Data from apps is only copied when making a backup.