Installed Package information, specifically Status
Kris, You can query all the installed packages on your org using following SOQL,
SELECT CreatedDate,ExpirationDate,Id,Status FROM PackageLicense WHERE NamespacePrefix = 'XXX'.
The PackageLicense object became available in api version 31.0.
Thanks,