Smart build clean

**TODO**

- [x] add docs