To uninstall ClosePlan app from your Sandbox or Production, follow these steps:
Go to ClosePlan Admin tab > Environment > Maintenance > hit Delete Context Metadata button and Confirm
2. Go to Setup > Historical Trending > object CP Event > disable the checkbox Enable Historical Trending and Save
3. Go to Installed Packages and uninstall ClosePlan app
If Delete Context Metadata button is disabled:
Connected App configuration is broken (configuration for ClosePlan Metadata)
Go to Setup > Named Credentials > hit Edit by ClosePlan Metadata Service and Save.
Log in to your organization and hit the Delete Context Metadata button.
If the button is still disabled, please check out the Connected app, Auth.Provider and Named Credentials instructions from our guide and configure all. In case you need a help, contact ClosePlan support team.