Search code examples
tup

Cleaning with Tup


How do I clean my build artifacts with Tup?

My project generates a lot of artifacts that I would like to have cleaned up. Tup doesn't seem to have a way to do it, and git reset --hard HEAD, even after a git add -Af, doesn't work.


Solution

  • Tup does not have a clean function like Makefiles can define.

    If you're using a Git repository, you can git-clean your repository.

    $ git add -A
    $ git reset --hard HEAD
    $ git clean -dffx
    

    If you're working on some changes and need to clean away all of the stuff without killing your changes, use:

    $ git clean -Xf