clean#

Clean build artifacts for the active preset.

clibra clean                # run cmake --build --target clean
clibra clean --all          # remove the entire build directory

Without --all, clibra clean runs the clean target via the build system — this removes compiled objects and binaries but preserves the CMake cache and generated build files, so the next build does not need to reconfigure.

With --all, the entire binaryDir is deleted (equivalent to rm -rf). The build directory must exist; clibra clean --all exits with an error if it does not. The next clibra build will reconfigure from scratch.

CMake equivalent#

# Without --all
cmake --build --preset <n> --target clean

# With --all (binaryDir from preset)
rm -rf <binaryDir>

Flag reference#

clibra clean#

Clean build artifacts for the active preset

Usage: clibra clean [OPTIONS]

Options:#

  • --all — Removes the preset’s binaryDir entirely (rm -rf). Requires the build directory to exist; exits with an error otherwise