class Gem::Commands::UninstallCommand

def uninstall_all

def uninstall_all
  specs = Gem::Specification.reject(&:default_gem?)
  specs.each do |spec|
    options[:version] = spec.version
    uninstall_gem spec.name
  end
  alert "Uninstalled all gems in #{options[:install_dir] || Gem.dir}"
end