UiPath Documentation
uipath-cli
latest
false
UiPath CLI user guide

uip rpa cleanup

Syntax and options for `uip rpa cleanup`, which removes unused items from a UiPath Studio project, or only detects them with `--dry-run`.

uip rpa cleanup removes unused items from a UiPath Studio project. It modifies the project sources in place. Pass --dry-run to only detect the unused items and leave every project file unchanged.

Synopsis​

uip rpa cleanup [project-dir] [options]
uip rpa cleanup [project-dir] [options]
  • [project-dir] — path to the project directory, its project.json file, or a .uip archive. Defaults to --project-dir, or the current directory. A .uip archive is accepted only with --dry-run.

Options​

FlagDescription
--dry-runDetect unused items without modifying any project files.
--skip-importsKeep references to the removed items in the project's files, instead of cleaning up the references that become unused.
--project-dir <path>Path to the project directory. Alternative to the positional argument.
--exclude-configured-sourcesIgnore user and machine NuGet sources during dependency resolution.
--nuget-sources-config-path <path>Path to a NuGet sources configuration file.
--feed-folder <name>Resolve library dependencies from this Orchestrator folder's feed instead of every tenant feed. Accepts a folder name or a fully qualified path.
--log-level <level>Log level. Defaults to Warn.

For the complete option list on your installed tool version, run:

uip rpa cleanup --help
uip rpa cleanup --help

Examples​

# List the unused items in the project in the current directory, without changing anything
uip rpa cleanup --dry-run

# Remove the unused items from a project
uip rpa cleanup ./MyProject

# Check a .uip archive for unused items
uip rpa cleanup ./MyProject.uip --dry-run
# List the unused items in the project in the current directory, without changing anything
uip rpa cleanup --dry-run

# Remove the unused items from a project
uip rpa cleanup ./MyProject

# Check a .uip archive for unused items
uip rpa cleanup ./MyProject.uip --dry-run

Data shape (--output json)​

FieldDescription
Successtrue when the cleanup completed.
DryRuntrue when the command ran with --dry-run and changed no files.
UnusedItemsThe unused items found in the project.
CleanedFilesThe project files the cleanup modified. Empty with --dry-run.
ToolDetailsAdditional details from the packager, when it reports any.

Running without --dry-run against a .uip archive fails with exit code 1, because an archive can't be cleaned in place.

  • Synopsis​
  • Options​
  • Examples​
  • Data shape (--output json)​
  • Related​

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated