---
schema_version: "1"
id: cca260a93c7db3e98e52f0a9fbdb330b4855cd7d5925dd285dd40e83bff3ec0f
title: Specifying an Uninstall Script
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/first-generation/apex-uninstall-script-specify.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg1-dev/guide/apex-uninstall-script-specify.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7a589acf9984c89f42878a69e2a7e72b1eb674cad98f8d6fe0a4c93f6ac45fcd
products:
  - First-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Specifying an Uninstall Script

After you’ve created and tested the uninstall script and included it as a member of your package, you can specify it in the **Uninstall Script** lookup field on the Package Detail page.

In subsequent patch releases, you can change the contents of the script but not the Apex class.

The class selection is also available via the Metadata API as `Package.uninstallClass`. This is represented in package.xml as an `<uninstallClass>foo</uninstallClass>` element.
