Buck: buck clean
Support Ukraine. Help Provide Humanitarian Aid to Ukraine.

buck clean

Delete artifacts and state files generated by Buck.

Buck generates artifacts in the form of files and Buck also maintains its state using files. Deleting these files resets Buck's state so that the next build that runs is guaranteed to be a clean build.

The set of files that Buck generates and the location where Buck stores these files change over time because these are a function of the Build configuration and the version of Buck that you are using. However, the buck clean command always removes the appropriate set of files for your build and Buck version.

Do not manually try to modify the buck-out directory

Buck primarily stores the state of your build in the buck-out directory which is located in the root of your Buck project. However, you should not try to manually modify the contents of buck-out. Buck's implementation assumes that buck-out is not touched by anything external to Buck. If you modify buck-out, Buck might behave in ways that are unpredictable.


  • --dry-run

    Print a list of the directories that would be removed if the command ran normally.

  • --keep-cache

    Keep the local (dir) caches. For more information about the local caches, see the [cache] section of .buckconfig.

    Additional Parameters

    For additional parameters that are available with this command, see the Common Parameters topic.