Using exclusively terminal, how can one identify and delete the expired provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles
Is there a way to do that just from terminal?
Using exclusively terminal, how can one identify and delete the expired provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles
Is there a way to do that just from terminal?
You can write a shell script that will loop through the files, grab the date from the mobileprovision file, and check it against the current date.
You can use the security command and plist buddy to extract the ExpirationDate from the file. Then for simplicity I just convert that date to a easily comparable format (YYYMMDD) and compare it to today's date in the same format. I print out the status of each. Note: I do not do the delete, because I want you to verify the script results before you uncomment the removal line. I ran it on mine, and threw in an old profile. It correctly identified the expired profile in my tests.