Skip to content
Riot Docs

Search is only available in production builds. Try building and previewing the site to test it out locally.

Install Riot GitHub

riot clean

riot clean is the command you use when you want the workspace to stop inheriting local history.

That usually means one of four things:

  • you want to recover disk space
  • you suspect stale local build state
  • you want to prove a package still builds from a clean baseline
  • you are preparing for a more deliberate release or publish pass

It is good for:

  • recovery
  • validation
  • cleanup

It is not ideal as a default debugging reflex.

If the normal workflow only works after repeated cleaning, something deeper is wrong and the toolchain should be fixed instead of normalized around cleanup.

Use riot clean when you want to make a stronger claim than “it worked on my machine with all my local state intact.”

That is especially useful before:

  • publishing
  • debugging dependency-state weirdness
  • reproducing a bug from a colder baseline

For the package-manager view of cleaning, including caches and GC, read Package Manager / riot clean.