# UiPath Solution Uninstall Deployment

> The UiPath Solution Uninstall Deployment task uninstalls a solution deployment on UiPath Orchestrator. This removes the deployed solution from the target environment, stopping all associated processes and cleaning up resources.

The UiPath Solution Uninstall Deployment task uninstalls a solution deployment on UiPath Orchestrator. This removes the deployed solution from the target environment, stopping all associated processes and cleaning up resources.

:::note
Solutions are currently supported only in Automation Cloud. Support for Automation Suite is planned for a future release. On-premises (MSI) Orchestrator does not support Solutions.
:::

:::note
This task is compatible only with `UiPath.CLI.Windows` or `UiPath.CLI.Linux` at least version 25.10 or higher.
:::

## Configuration

Use the following table to configure the UiPath Solution Uninstall Deployments inputs.

| Parameter | Description |
|-----------|-------------|
| **Orchestrator connection** (Required) | A service connection to the Orchestrator instance for uninstalling solution deployment. |
| **Deployment name** (Required) | The name of the deployment to uninstall. |
| **Trace Level** | The trace logging level. Default: `Error`. Options: `None`, `Critical`, `Error`, `Warning`, `Information`, `Verbose` |

## Notes

- **Solution uninstallation**: This task removes deployed solution packages from Orchestrator environments
- **Deployment prerequisite**: Requires an existing solution deployment to be present in the target environment
- **Resource cleanup**: Uninstallation stops all running processes and cleans up associated resources
- **Irreversible operation**: Uninstallation cannot be undone; the deployment must be recreated if needed again
- **Environment management**: Useful for environment cleanup, rollback scenarios, and deployment lifecycle management
- **Orchestrator connection**: Requires a valid service connection to the target Orchestrator instance
- **CLI compatibility**: This task uses the UiPath CLI internally and requires proper CLI installation on the build agent
- **Minimum CLI version**: Requires UiPath CLI version 25.10 or higher for full compatibility
- **Safety consideration**: Ensure no critical processes are running before uninstalling

## Pipeline examples

### Basic solution uninstallation

```yaml
- task: UiPathSolutionUninstallDeployment@6
  displayName: 'Uninstall Solution Deployment'
  inputs:
    orchestratorConnection: 'UiPath-Orchestrator-Connection'
    deploymentName: 'MySolution-Deployment'
    traceLevel: 'Information'
```

### With Orchestrator connection and detailed logging

```yaml
- task: UiPathSolutionUninstallDeployment@6
  displayName: 'Uninstall Old Business Solution'
  inputs:
    orchestratorConnection: 'Production-Orchestrator'
    deploymentName: 'BusinessSolution-Prod-Deploy-Old'
    traceLevel: 'Verbose'
```

### Rollback pipeline: uninstall and redeploy

```yaml
variables:
  solutionName: 'MyBusinessSolution'
  currentDeployment: '$(solutionName)-Production-$(Build.BuildNumber)'
  previousDeployment: '$(solutionName)-Production-$(Build.PreviousBuildNumber)'
  environmentName: 'Production'

steps:
- task: UiPathSolutionUninstallDeployment@6
  displayName: 'Uninstall Current Deployment'
  inputs:
    orchestratorConnection: 'Production-Orchestrator'
    deploymentName: '$(currentDeployment)'
    traceLevel: 'Information'
  continueOnError: true

- task: UiPathSolutionActivateDeployment@6
  displayName: 'Reactivate Previous Deployment'
  inputs:
    orchestratorConnection: 'Production-Orchestrator'
    deploymentName: '$(previousDeployment)'
    traceLevel: 'Information'

- script: echo "Rolled back from $(currentDeployment) to $(previousDeployment)"
  displayName: 'Rollback Summary'
```
