> [!CAUTION]
> **Caution:** This documentation covers Edge for Private Cloud 4.52.00, which is no longer supported. Google does not provide security patches, bug fixes, or technical support for this version. The current supported version is 4.54.00. See the [Edge for Private Cloud documentation](https://docs.apigee.com/private-cloud/latest/overview) for the current version, or [All versions](https://docs.apigee.com/private-cloud/versions) to compare releases.

You can uninstall individual components, all components, or completely remove Edge from your
system. In addition, you can [roll back Edge](https://docs.apigee.com/private-cloud/v4.52.00/rollback-45000) if you upgraded.

## Uninstall individual components

To uninstall a component, use the `apigee-service` utility in the form:

```
/opt/apigee/apigee-service/bin/apigee-service component_name uninstall
```

Where <var translate="no">component_name</var> identifies the component you want to uninstall. The possible
values of <var translate="no">component_name</var> include the following:

- `apigee-cassandra` (Cassandra)
- `apigee-openldap` (OpenLDAP)
- `apigee-postgresql` (PostgreSQL database)
- `apigee-qpidd` (Qpidd)
- `apigee-sso` (Edge SSO)
- `apigee-zookeeper` (ZooKeeper)
- `edge-management-server` (Management Server)
- `edge-management-ui` (new Edge UI)
- `edge-message-processor` (Message Processor)
- `edge-postgres-server` (Postgres Server)
- `edge-qpid-server` (Qpid Server)
- `edge-router` (Edge Router)
- `edge-ui` (Classic UI)

In addition to these components, you can also uninstall the `apigee-provision` and
`apigee-validate` components.

For example, to uninstall the Edge UI:

```
/opt/apigee/apigee-service/bin/apigee-service edge-ui uninstall
```

This command does not delete any data or log files. It only deletes the component.

## Uninstall Monetization

Before uninstalling Monetization, we recommend backing up Postgres.

To uninstall Monetization, including all Monetization data:

1. Check if Monetization is enabled for your organization:

   ```
   curl -u sysAdminEmail:adminPasswd -X GET http://management_server_IP:8080/v1/organizations/ORG
   ```

   where <var translate="no">ORG</var> is your organization name. Here is a sample response:

   ```
   {
     "createdBy" : "admin@apigee.com",
     "displayName" : "edge",
     "environments" : [ "prod", "test" ],
     "lastModifiedBy" : "admin@apigee.com",
     "name" : "edge-platform",
     "properties" : {
       "property" : [ {
         "name" : "features.isMonetizationEnabled",
         "value" : "true"
       } ]
     },
     "type" : "paid"
   }
   ```
2. Disable Monetization and enable deletion for the organization using the following properties:

   ```
   <Property name="features.isMintOrgDataDeletionAllowed">true</Property>:
   <Property name="features.isMonetizationEnabled">false</Property>
   ```

   > [!NOTE]
   > **Note:** Make sure to add any other properties that are present in the organization. Use the [GET organization](https://docs.apigee.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) call to fetch the list of all current properties of the organization.

   Here is a sample update request:

   ```
   curl -H "Content-Type:application/xml" -u sysAdminEmail:adminPasswd \
   -X POST http://management_server_IP:8080/v1/organizations \
   --header 'Content-Type: application/xml' \

   --data '<Organization type="paid" name="edge-platform">
      <DisplayName>edge-platform</DisplayName>
      <Properties>
          <Property name="features.isMintOrgDataDeletionAllowed">true</Property>
          <Property name="features.isMonetizationEnabled">false</Property>
           # List all other properties that are present in the organization.
      </Properties>
   </Organization>'
   ```
3. To delete Monetization data for the organization, use a command like the following:

   ```
   curl -H "Content-Type:application/json" \
       -u sysAdminEmail:adminPasswd -X POST \
       http://management_server_IP:8080/v1/organizations/org_name/delete-org-data
   ```

   Here is a sample response:

   ```
   {
     "id" : "ccfb2d26-a2a2-4ebc-aef7-5f7083c6fd84",
     "log" : "",
     "orgId" : "edge-platform",
     "status" : "RUNNING",
     "type" : "DELETE_ORG"
   }
   ```

   The command starts an asynchronous task to delete monetization organization data.
   To check the status of this task, use a command like the following:

   ```
   curl -H "Content-Type:application/json" \
     -u sysAdminEmail:adminPasswd -X GET \
     http://management_server_IP:8080/v1/mint/asyncjobs/JOBID
   ```

   where <var translate="no">JOBID</var> is the id for the task. Here is a sample response:

   ```
   {
     "id" : "ccfb2d26-a2a2-4ebc-aef7-5f7083c6fd84",
     "log" : "",
     "orgId" : "edge-platform",
     "status" : "COMPLETED",
     "type" : "DELETE_ORG"
   }
   ```
4. Find the Analytics group created for Monetization using a command like the following:

   ```
   curl -H "Content-Type:application/json" \
       -u sysAdminEmail:adminPasswd -X GET \
       http://management_server_IP:8080/v1/analytics/groups/ax/
   ```
5. Remove the organization and environment scopes from the Analytics group:

   ```
   curl -H "Content-Type:application/json" \
       -u sysAdminEmail:adminPasswd -X DELETE \
       http://management_server_IP:8080/v1/analytics/groups/ax/GROUP/scopes?org=ORG<\var>&env=ENV
   ```

   where
   - <var translate="no">GROUP</var> is the Analytics group.
   - <var translate="no">ORG</var> is the organization.
   - <var translate="no">ENV</var> is the environment.
6. Remove Qpid, Postgres, and consumer servers from the Analtyics group:

   ```
   curl -H "Content-Type:application/json" "http://localhost:8080/v1/analytics/groups/ax/mxgroup001/servers/?uuid=UUID&type=TYPEOFSERVER" -X DELETE -u$SUP
   ```

   where
   - <var translate="no">UUID</var> is the Universally Unique IDentifier.
   - <var translate="no">TYPEOFSERVER</var> is the type of server.
7. Delete the MX group (the group used for Apache Qpid and rating servers):

   ```
   curl -H "Content-Type:application/json" \
       -u sysAdminEmail:adminPasswd -X DELETE \
       http://management_server_IP:8080/v1/analytics/groups/ax/group
   ```
8. Remove Monetization components (Management and Message Processors):

   ```
   apigee-service edge-mint-gateway uninstall
   ```

After uninstalling Monetization, restart the management and message processors:

```
apigee-service edge-management-server restart
```

```
apigee-service edge-message-processor restart
```

## Uninstall all components

To uninstall all Apigee components on the node, uninstall the `apigee-service`
utility:

```
/opt/apigee/apigee-service/bin/apigee-service apigee-service uninstall
```

This command does not delete any data or log files. It only deletes the components.

## Remove Edge

To completely remove Edge from your system:

1. Stop all Edge services running on the machine:

   ```
   /opt/apigee/apigee-service/bin/apigee-all stop
   ```
2. Clear the yum cache:

   ```
   sudo yum clean all
   ```
3. Remove all the Apigee RPMs:

   ```
   sudo rpm -e $(rpm -qa | egrep "(apigee-|edge-)")
   ```
4. Remove the installation root directory:

   ```
   sudo rm -rf /opt/apigee
   ```
5. Remove the Nginx directory:

   ```
   sudo rm -rf /opt/nginx
   ```