uipath-cli
latest
false
UiPath CLI user guide
- Overview
- Get started
- Concepts
- Using UiPath CLI
- How-to guides
- CI/CD recipes
- Command reference
- Overview
- Exit codes
- Global options
- uip codedagent
- uip coder
- uip context-grounding
- uip docsai
- uip function
- uip guardrails
- uip llm-configuration
- uip llm-gateway
- uip model-hub
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- create-project
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-library-object-repository
- get-object-repository
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-instances
- list-workflow-examples
- pack
- publish
- remote
- restore
- run, debug & execution
- run-file
- search-templates
- start-studio
- stop-execution
- tm
- uia
- uip tasks
- uip traces
- uip traces feedback
- Migration
- Reference & support
Syntax and options for `uip solution cleanup`, which removes unused items from every project in a UiPath solution.
uip solution cleanup removes unused items (activities, dependencies) from every project in a solution. For a solution directory, project sources are modified in place; pass --dry-run to only detect unused items without changing anything.
Synopsis
uip solution cleanup <solutionPath> [--dry-run] [--skip-imports] [--nuget-sources-config-path <path>] [--exclude-configured-sources] [--feed-folder <name>] [--login-validity <minutes>]
uip solution cleanup <solutionPath> [--dry-run] [--skip-imports] [--nuget-sources-config-path <path>] [--exclude-configured-sources] [--feed-folder <name>] [--login-validity <minutes>]
Arguments
| Name | Required | Purpose |
|---|---|---|
<solutionPath> | yes | Path to a solution directory (containing .uipx) or a .uis file. |
Options
| Long | Value | Default | Description |
|---|---|---|---|
--dry-run | flag | off | Detect unused items but don't modify any project files. |
--skip-imports | flag | off | Don't clean up now-unused references to removed items in the project's files. |
--nuget-sources-config-path | path | — | Path to a NuGet sources configuration file. |
--exclude-configured-sources | flag | off | Resolve project dependencies only from tenant feeds and --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds — a dependency not on those feeds fails to restore. |
--feed-folder | name or path | — | Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. |
--login-validity | minutes | 10 | Minimum minutes before token expiration to trigger a refresh. |
Examples
# Remove unused items from every project, modifying files in place
uip solution cleanup ./my-solution
# Detect without modifying anything
uip solution cleanup ./my-solution --dry-run
# Remove unused items from every project, modifying files in place
uip solution cleanup ./my-solution
# Detect without modifying anything
uip solution cleanup ./my-solution --dry-run
Data shape (--output json)
{
"Code": "SolutionCleanup",
"Data": {
"DryRun": false,
"ChangedFilesByProject": {
"project-design-id": ["project.json", "Main.xaml"]
},
"CleanupByProject": {
"project-design-id": {
"unusedItems": ["UiPath.Stale.Activities"],
"cleanedFiles": ["Main.xaml"]
}
}
}
}
{
"Code": "SolutionCleanup",
"Data": {
"DryRun": false,
"ChangedFilesByProject": {
"project-design-id": ["project.json", "Main.xaml"]
},
"CleanupByProject": {
"project-design-id": {
"unusedItems": ["UiPath.Stale.Activities"],
"cleanedFiles": ["Main.xaml"]
}
}
}
}
With --dry-run, ChangedFilesByProject is empty and each project's cleanedFiles stays empty, since nothing was written.
Exit codes
See Exit codes for the shared contract.
Related commands
uip solution restore— resolve NuGet dependencies (run beforepack, not related to cleanup).uip solution pack— package the solution after cleaning it up.
See also
- Global options and Exit codes — contracts shared by every verb.