![Forrest logo](/images/logo.png)
bazel:tldr:230c3
The command "bazel clean" is used in the Bazel build system to clean (or delete) the output files and directories generated by previous build operations.
When you build a project with Bazel, it generates several output files and directories, such as compiled binaries, object files, and intermediate build artifacts. These files are stored in the "bazel-out" directory, as well as other directories specific to your project.
The "bazel clean" command helps you remove these generated files and directories, allowing you to start with a clean slate. By running this command, you ensure that all output files are deleted, and the next build operation will only create new files based on the current source files and dependencies.
It is important to note that "bazel clean" does not undo any changes made to your source files or project configuration. It only removes the build-related files.