#artifact #build #find #directory #tool #clean #up

nightly bin+lib file-sniffer

Command-line tool to find build artifacts and junk on your computer

57 releases (12 stable)

Uses old Rust 2015

3.0.1 Jun 16, 2017
1.4.2 Jun 14, 2017
0.1.44 Jun 8, 2017
0.1.18 May 31, 2017

#1403 in Filesystem

Download history 2/week @ 2024-02-14 53/week @ 2024-02-21 2/week @ 2024-02-28 24/week @ 2024-03-13 116/week @ 2024-03-27 175/week @ 2024-04-03

291 downloads per month

Custom license

874 lines


Build Status

If you do a significant amount of programming, you'll probably end up with build artifacts scattered about. sniff is a tool to help you find those artifacts. It's especially useful when you're writing build systems, because you can make sure your clean command gets everything.


Binary install

The easiest way to install for Linux or Windows is to download a binary from the releases page.


If your platform doesn't have binaries, get cargo. Then:

 $ cargo install file-sniffer

If you want the absolute latest version:

 $ cargo install --git https://github.com/vmchale/file-sniffer 

Make sure you are on nightly; if in doubt run

rustup run nightly cargo install file-sniffer

Shell completions

After setting BASH_COMPLETIONS_DIR or FISH_COMPLETIONS_DIR, you can use the bash or fish features like so:

 $ cargo install --features fish file-sniffer


Currently, sniff looks for files that either have an extension associated with artifacts or executable files listed in the relevant .gitignore.

Search current directory for directories with build artifacts:

 $ sniff ar

Look in $DIR for build artifacts and sort by size:

 $ sniff ar $DIR --sort

Look for artifacts or directories containing artifacts that occupy more than 1GB of disk space:

 $ sniff ar -t1G


To turn off colorized output:

export CLICOLOR=0


  • find "likely build artifact" directories
    • use .gitignore/path to make decision
    • smart output (only first few files per dir)
  • match speed of gnu utils on traversals
    • faster when finding artifacts
    • faster with excludes
    • faster on small directories
    • beat du on large directories
  • colorized output
  • sort results by size

Languages Supported

The intent is to support basically anything, so if your DOC is not on the list, feel free to open a PR or start an issue.

  • Haskell (incl. GHCJS)
  • rust
  • julia
  • python
  • Elm
  • nim
  • Vimscript
  • Idris
  • C

Foreign-language binaries

These are still very much works in progress; as of now errors and warnings are still in English. Binaries will be available once things stabilize.


cargo install file-sniffer --no-default-features --feature francais # crates.io doesn't permit unicode in feature names 


cargo install file-sniffer --no-default-features --feature deutsch


~153K SLoC