The Flit: Getting rid of Apple and MS fly shit

Apple and Microsoft drop fly shit on your harddisk. Files like Thumbs.db, Thumbs.db:encryptable and .DS_Store are pooped everywhere. Although well-intentioned, these files pollute your environment. You can hardly prevent their creation but you can eradicate them.

My grandmother yelled: “Those damned mosquitoes”. She grabbed the “FLIT”, she sprayed in every corner of the bedroom where I was ready to go to sleep. After “The Flit” I slept like a rose (Dutch-ism). I haven’t seen them for 50 years since the emergence of the modern spray can.

As a memorial, you will find a small Cygwin / Linux script for exterminating “Thumbs.db” et al on your hard disk. Modern times, different pests, different solutions. Hallelujah and here we go!

Courtesy Bullenwächter, Hamburg Museum

Scripts for deleting Thumbs.db, Thumbs.db:encryptable, .DS_Store, …


Put this in a file somewhere, like desktop or home, make it executable and modify to taste…

find /data \( -name 'Thumbs.db' -or -name 'desktop.ini' -or -name 'Thumbs.db:encryptable' -or -name 'Thumbs.dbencryptable' -or -name '.DS_Store' \) -print0 | xargs -0 rm -rf
  • find finds (recursive) the files between escaped parenthesis \(...\) and lists the files (print0) in directory /data. Output is piped to xargs that takes care of removal (rm). The zero’s deal with file names with spaces.
  • It is one of many possible approaches, but what I like about this approach is that you can check output first, by running it in a shell without | xargs -0 rm -rf.
  • On our server this script runs every night by using cron.


  • A DOS batch file named flit.cmd could be something like:
@echo on
cd /installers
del /s /q /f Thumbs.db desktop.ini .DS_Store Thumbs.db:encryptable
echo Finished FLIT.cmd

Leave a comment