def uninstall!
      deactivate!

      FileUtils.rm_rf(self.path) if self.installed?

      # destroy any cached files first
      clean_scripts!

      # remove the repository from the database
      destroy if saved?

      yield self if block_given?
      return self
    end
def uninstall!
      deactivate!

      FileUtils.rm_rf(self.path) if self.installed?

      # destroy any cached files first
      clean_scripts!

      # remove the repository from the database
      destroy if saved?

      yield self if block_given?
      return self
    end
Deletes the contents of the repository.

 @yield [repo]
   If a block is given, it will be passed the repository after it's
   contents have been deleted.

 @yieldparam [Repository] repo
   The deleted repository.

 @return [Repository]
   The deleted repository.

 @since 1.0.0

 @api private