lib/coresys.rb
# Uninstall removes all the installed versions of the formula
# and unlinks the currently linked one if present
Uninstall removes all the installed versions of the formula
and unlinks the currently linked one if present
Uninstall removes all the installed versions of the formula and unlinks the currently linked one if present
def uninstall(name)
      formula = Formula.find_or_stub(name).new
      error!("#{formula.name} is not installed") unless formula.installed?
      section_start "Uninstalling #{formula.name}"
      if formula.linked?
        linked = (Coresys.linked + formula.name).realpath
        Linker.new(formula.name, linked.basename, linked).unlink
      end
      formula.root.children.each do |version|
        info "Removing #{formula.name}@#{version.basename}"
        version.rmtree
      end
      section_end
    end
def uninstall ( name ) formula = Formula . find_or_stub ( name ) . new error! ( "#{formula.name} is not installed" ) unless formula . installed? section_start "Uninstalling #{formula.name}" if formula . linked? linked = ( Coresys . linked + formula . name ) . realpath Linker . new ( formula . name , linked . basename , linked ) . unlink end formula . root . children . each do | version | info "Removing #{formula.name}@#{version.basename}" version . rmtree end section_end end
Uninstall removes all the installed versions of the formula
and unlinks the currently linked one if present
Uninstall removes all the installed versions of the formula and unlinks the currently linked one if present
name