Resistence is futile, you will be detoxified.


Remove any traces left by version control systems with ease. Small size and footprint. No complicated procedures. Focus on your code.


Detoxify currently supports CVS, Subversion, Git and Mercurial. Other version control systems can be added, just check the source code.


Detoxify works on the major operating systems, due to Ruby interpreter. Script will behave exactly the same on each system.


Written on Ruby using only methods available in the standard library. Plain and simple. No third party gems. Code portability matters.


Source code is fully available. You are free to modify and redistribute the code. Opensource matters. Just make your choice.


Detoxify is free as in free speech. For an open community. For an open world. Opensource unites us. Everyone is invited.


Toxic waste no more.

Detoxify is a command line script written in Ruby for the sole purpose of removing any traces left by version control systems. These traces include hidden files and directories.

In my humble opinion, if you don't intend to use a version control system on a project you just did a checkout, there's no need of keeping those tracking files and directories. If that's the case, Detoxify is suitable for that. Personally, I recommend you to use a version control system and let the tracking structure intact, but there are some moments in which you just want to code alone.


The answer is 42.

I wrote Detoxify while keeping in mind all of these features:

  • It's a straightforward code, with a very small size and footprint. Probably due to the fact this script was written with recursion, code is pretty clean and concise (I'm aware of a potential issue, check the next section).
  • It's written using only methods available in the standard Ruby library. No need of third party gems. I'm not sure, but I believe this code can run on the majority of Ruby implementations (check the next section).
  • Since it's written on an interpreted language, it works on the major operating systems, as long as a Ruby interpreter is available.
  • It currently supports the following version control systems: CVS, Subversion, Git and Mercurial. Other version control systems can be added, just check the source code.

Known issues

Segmentation fault. Not my fault.

I'm aware of some known issues. If one of them really matters to you, you problaby should consider on not using this script.

  • This script was checked against a clean Ruby 1.9.2 environment, but I'm almost sure it will work on previous versions. Unfortunately, I have no idea of how this script will behave when used in other Ruby flavours, such as JRuby or IronRuby.
  • It's wise to check your project directory permissions beforehand, otherwise Detoxify will fail when trying to remove files or directories within that project directory.
  • This script heavily relies on recursion, and of course there's a physical limit for Ruby stack. I think Detoxify will fail when dealing with projects with a very complex directory structure. But I guess it's worth a shot. I hope to write an iterative version, but that won't happen too soon.


Free as in free speech.

This script is licensed under the New BSD License. I want to call your attention to the fact that the New BSD License has been verified as a GPL-compatible free software license by the Free Software Foundation, and has been vetted as an open source license by the Open Source Initiative.


Use the force, Luke.

Detoxify is pretty simple to use. Just open your terminal, navigate to the project top directory and type detoxify. No parameters are needed. Well, in fact, there are two parameters: --help will print the help message, and --verbose will activate the verbose mode (useful for debugging or tracking errors).


Next time, I will write this script in LISP.

Current version is 1.0 (Andromeda).

You can download Detoxify in the project page hosted on (those guys are great!). Alternatively, you can take a shortcut and click one of the following buttons which will lead you to the Files section.

This button will lead you to the good ol' Ruby script, which is known to work on all platforms. You must have a Ruby interpreter. If you use Microsoft Windows, there is an experimental standalone application. There's no need of a Ruby interpreter for this version.
Download Download

The standalone Windows application is generated directly from the original Ruby source without any changes or code replacements. I used Lars Christensen's Ocra, the amazing One-Click Ruby Application Builder, with the default options. Please, just keep in mind that the executable is a self-extracting, self-running executable that contains the Ruby interpreter, your source code and any additionally needed Ruby libraries or DLL's. If you could provide some feedback on this standalone version, it will help me a lot.

Attention: Any maliciously modified version of this script can be used to remove all types of files and directories. Don't trust other sources than the official script repository on Besides, always verify the files checksums in order to get the correct version.

Ruby script (detoxify.rb)

  • MD5: B624EF3052A0AE7666D45FF926CACE8A
  • SHA1: 61844AEFF51007E5B5F1C83B56932A15BADB4731

Standalone Windows application (detoxify.exe)

  • MD5: 3804DB578BC60E1587D6345653095F73
  • SHA1: A27FD430E1AFDADE86BA3C7A2867A408DF255EF2

This is just a friendly warning. If you follow good code and software practices, you won't have any problems. That's the beauty of opensource, you can view the source code and check by yourself for any potential issues.

Congratulations, you are now a proud user of Detoxify!


Logic is little tweeting bird chirping in meadow.

You can contact me through This website has an internal messaging system. If you prefer, you can also reach me through electronic mail:

Please, replace the first (#) symbol by (@) and the second and third (#) symbols by (.) cereda # users # sf # net

I also have a Twitter account, so you can follow me, if you want.

About me

Useful links

Project info

Detoxify is a Ruby script created for the sole purpose of removing any traces left by version control systems on a project directory. Those traces include hidden directories and files.

Project author

Paulo Roberto Massa Cereda, brazilian developer, programmer and somehow mathematician. Usually there's too much blood in my cafeine system.


I'm really not sure why I came up with the Detoxify name. I was looking for some word to express the need of removing something annoying, unused or even unwanted. I was watching one of the Simpsons episodes, then I saw Homer dealing with toxic waste. Eureka, that's a nice reference! So I found my project name.