           @logger.error "Error setting up files for `#{target_loc}`."
         fn(err, { name: file.name, md5: data })
 
-  # ###*
-  #  * Deletes the directories for the application.
-  #  * @param {Object} (tag) The tag to create directories for
-  #  * @param {Function} (fn) The callback function
-  # ###
-  # delete_files: (tag, fn) =>
-  #   dirloc = [@user, @application, @dtype, name].join('/')
-  #   fs.rmdir [@config.get('repository'), dirloc].join('/'), (err) =>
-  #     if err
-  #       @logger.error "Error removing directories for `#{dirloc}`."
-  #     fn(null, true)
+  ###*
+   * Deletes the files for the current leaf.
+   * @param {Function} (fn) The callback function
+  ###
+  delete_files: (fn) =>
+    dirloc = [@user, @application, @dtype, @current].join('/')
+    target_dir = [@config.get('repository'), dirloc].join('/')
+    fs.readdir target_dir, (err, reply) =>
+      async.parallel reply, fs.unlink, (err) =>
+        if err
+          @logger.error "Error removing directories for `#{dirloc}`."
+        fn(null, true)
 
 module.exports = Files

async = require 'async'
path = require 'path'
mv = require 'mv'

RedisObject = require './redis_object'

   * @example
   *
   *   files = [
   *     { location: "/tmp/54e05c292ef585094a12b20818b3f952", name: "myapp.ipa" },
   *     { location: "/tmp/ab1e5d1ed4be9d7cb8376cbf12f85ca8", name: "myapp.plist" }
   *   ]
   *
  ###
