---
schema_version: "1"
id: e1a53c7c017038d007db8f6a5b46c69009fceebb3f0462d5dfa13eadd0b71687
title: package uninstall
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/package/cli_reference_package_uninstall.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_package_uninstall.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 374f20c54bcf8ae18b48b3a8ef87da82cbf9a42bdc64434e557819fb33b14b21
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# package uninstall

Uninstall a second-generation package from the target org.

## Description for package uninstall

Specify the package ID for a second-generation package.

To list the org’s installed packages, run "sf package installed list".

To uninstall a first-generation package, from Setup, enter Installed Packages in the Quick Find box, then select Installed Packages.

## Aliases for package uninstall

`force:package:uninstall`

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;package</code> | <code>&#8209;p</code> | **Type:** Value<br>**Required**<br><br>ID (starts with 04t) or alias of the package version to uninstall. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |
| <code>&#8209;&#8209;wait</code> | <code>&#8209;w</code> | **Type:** Value<br>**Default value:** `0 minutes`<br><br>Number of minutes to wait for uninstall status. |

## Examples for package uninstall

Uninstall a package with specified ID from an org with username me@example.com:

```shell
sf package uninstall --package 04t... --target-org me@example.com
```

Uninstall a package with the specified alias from your default org:

```shell
sf package uninstall --package undesirable_package_alias
```

Uninstall a package with an alias that contains spaces from your default org:

```shell
sf package uninstall --package "Undesirable Package Alias"
```
<!-- prettier-ignore-end -->
