# Uploading and Deleting Solution Packages

> After packing a solution, you can upload the package to Solutions in Orchestrator. You can also delete packages when they're no longer needed.

After packing a solution, you can upload the package to Solutions in Orchestrator. You can also delete packages when they're no longer needed.

:::tip Trusting custom certificates
For Orchestrator instances signed by a private Certificate Authority (such as UiPath Automation Suite), both `upload-package` and `delete-package` also accept `--ca-cert` and `--pinnedpubkey` parameters. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates) for scenarios and examples.
:::

## Uploading a package

The `upload-package` command pushes a solution `.zip` file to Solutions.

### Command syntax

```bash
uipcli solution upload-package <package-path> [options]
```

#### Parameters

| Parameter | Description | Required |
|-----------|-------------|----------|
| `<package-path>` | Path to the `.zip` package file | Yes |
| `-U` | Orchestrator URL | Yes |
| `-T` | Tenant name | Yes |
| `-A` | Organization name | Yes |
| `-I` | External App ID | Yes |
| `-S` | External App secret | Yes |
| `--applicationScope` | Optional scopes (defaults applied) | No |
| `--traceLevel` | Logging level | No |
| `--ca-cert` | Trusted root CA file(s) (PEM, DER, or PKCS#7) for the Orchestrator/Identity TLS certificate. Repeat or comma-separate. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |
| `--pinnedpubkey` | Pin the leaf public key (`sha256//<base64>`). See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |

### Authentication

See [Authentication and scopes](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/solutions-authentication-and-scopes) for required scopes and External App setup.

### Example

```bash
uipcli solution upload-package C:\Output\MySolution.1.2.3.zip \
  -U https://cloud.uipath.com/ \
  -T DefaultTenant \
  -A myorg \
  -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -S **** \
  --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
  --traceLevel Information
```

### Using CI/CD secrets

Never hardcode credentials in scripts. Use your platform's secret management:

#### Azure DevOps

```yaml
- script: |
    uipcli solution upload-package $(Build.ArtifactStagingDirectory)\MySolution.$(Build.BuildId).zip \
      -U $(orchestratorUrl) \
      -T $(orchestratorTenant) \
      -A $(organizationName) \
      -I $(externalAppId) \
      -S $(externalAppSecret) \
      --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
      --traceLevel Information
  displayName: 'Upload Solution Package'
```

#### GitHub Actions

```yaml
- name: Upload Solution Package
  run: |
    uipcli solution upload-package ${{ runner.temp }}/packages/MySolution.${{ github.run_number }}.zip \
      -U ${{ secrets.ORCHESTRATOR_URL }} \
      -T ${{ secrets.ORCHESTRATOR_TENANT }} \
      -A ${{ secrets.ORG_NAME }} \
      -I ${{ secrets.EXTERNAL_APP_ID }} \
      -S ${{ secrets.EXTERNAL_APP_SECRET }} \
      --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
      --traceLevel Information
```

## What happens after upload

Once uploaded, the package:

- Appears in Solutions in Orchestrator.
- Can be deployed to any target folder.
- Is versioned and tracked.
- Can be downloaded by other pipelines or users.

## Deleting a package

The `delete-package` command removes a solution package from Solutions.

### Command syntax

```bash
uipcli solution delete-package <package-name> [options]
```

#### Parameters

| Parameter | Description | Required |
|-----------|-------------|----------|
| `<package-name>` | Name of the package (without `.zip` extension) | Yes |
| `-v` or `--version` | Version number to delete | Yes |
| `-U` | Orchestrator URL | Yes |
| `-T` | Tenant name | Yes |
| `-A` | Organization name | Yes |
| `-I` | External App ID | Yes |
| `-S` | External App secret | Yes |
| `--applicationScope` | Optional scopes (defaults applied) | No |
| `--traceLevel` | Logging level | No |
| `--ca-cert` | Trusted root CA file(s) (PEM, DER, or PKCS#7) for the Orchestrator/Identity TLS certificate. Repeat or comma-separate. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |
| `--pinnedpubkey` | Pin the leaf public key (`sha256//<base64>`). See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |

:::note Default Application Scopes

When using external application authentication without specifying the `--applicationScope` parameter, the CLI automatically applies these default AutomationSolution scopes:

`Solutions.Packages Solutions.Deployments OR.Execution`

:::

### Authentication

See [Authentication and scopes](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/solutions-authentication-and-scopes) for required scopes and External App setup.

### Example

```bash
uipcli solution delete-package MySolution \
  -v 1.2.3 \
  -U https://cloud.uipath.com/ \
  -T DefaultTenant \
  -A myorg \
  -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -S **** \
  --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
  --traceLevel Information
```

### When to delete packages

Common scenarios for deleting packages:

- **Cleanup pipelines** - Remove old versions after successful deployment.
- **Failed builds** - Delete invalid packages that shouldn't be deployed.
- **Retention policies** - Enforce package lifecycle rules (e.g., keep only last 10 versions).
- **Storage management** - Free up space in Solutions.

### Pipeline example - cleanup old versions

```bash
# Delete old version after deploying new one
uipcli solution delete-package MySolution \
  -v 1.2.2 \
  -U https://cloud.uipath.com/ \
  -T DefaultTenant \
  -A myorg \
  -I $(externalAppId) \
  -S $(externalAppSecret) \
  --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write"
```

## Package naming

The package name used in upload and delete operations is derived from the solution name, not the filename.

### Example
- Pack command creates: `MySolution.1.2.3.zip`
- Package name for delete: `MySolution`
- Version: `1.2.3`

## Next steps

After uploading a package, you can:

1. [Download deployment configurations](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/downloading-solution-packages-and-configs).
2. [Deploy the Solution](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/deploying-and-activating-solutions) to a target environment.
