मैं डेवलपर की स्क्रिप्ट में जो देख रहा हूं, उससे यहाँ ऐसा लगता है कि वह अनुशंसा कर रहा है कि आप अपने "ऑक्स-जीसीसी-इंस्टॉलर" के शीर्ष पर एक्सकोड स्थापित करें जो कि अनइंस्टॉल करने में सक्षम हो ... उस बिंदु पर, आप अनइंस्टॉल-डेवुल्स स्क्रिप्ट चला सकते हैं ...
डेवलपर से:
अगर कुछ उम्मीद के मुताबिक काम नहीं करता है, तो इस इंस्टॉलेशन पर एक्सकोड स्थापित करने के लिए स्वतंत्र महसूस करें।
एक बार स्थापित होने के बाद, आप निम्नलिखित के साथ पूरी तरह से Xcode निकाल सकते हैं:
sudo /Developer/Library/uninstall-devtools -mode=all
वैकल्पिक रूप से, आप वास्तविक स्क्रिप्ट सामग्री को एक रिक्त पाठ दस्तावेज़ में कॉपी और पेस्ट कर सकते हैं (शायद "अनइंस्टॉल-डिवॉल्ट्स" नाम दिया गया है), इसे संपादन योग्य बनाएं ( chmod 755 uninstall-devtools
), और फिर इसे निष्पादित करें ( sudo ./uninstall-devtools -mode=all
):
#!/usr/bin/perl
####################################################################################################
#
# Copyright (c) 2002-2011 Apple, Inc.
# Xcode 4.2
#
# NAME
# uninstall-devtools -- Meta-script for running the various devtools uninstaller scripts.
#
# SYNOPSIS
# sudo /Developer/Library/uninstall-devtools --mode=all
# sudo /Developer/Library/uninstall-devtools --mode=xcodedir
# sudo /Developer/Library/uninstall-devtools --mode=unixdev
# sudo /Developer/Library/uninstall-devtools --mode=systemsupport
#
# Where the specified 'mode' value invokes the following devtools uninstaller scripts:
#
# all:
# /Library/Developer/Shared/uninstall-devtools
# /Library/Developer/4.2/uninstall-devtools
# /Developer/Library/uninstall-developer-folder
#
# xcodedir:
# /Developer/Library/uninstall-developer-folder
#
# unixdev:
# /Library/Developer/Shared/uninstall-devtools
#
# systemsupport:
# /Library/Developer/Shared/uninstall-devtools
# /Library/Developer/4.2/uninstall-devtools
#
# The default value for 'mode' is 'all'.
#
# DESCRIPTION
# This command runs the appropriate devtools uninstaller scripts according to the usage
# specified on the command line.
####################################################################################################
my $do_nothing = 0;
my $verbose = 0;
my $warning = 0;
my $debug = 0;
my $help = 0;
my $mode = '';
get_options(
'do-nothing' => \$do_nothing,
'verbose' => \$verbose,
'warning' => \$warning,
'debug' => \$debug,
'help' => \$help,
'mode' => \$mode,
);
####################################################################################################
if ($help == 1) {
print("Usage: $0 --mode=<all|xcodedir|unixdev|systemsupport>\n");
print <<"END";
This is a meta-script which invokes one or more of the devtools
uninstaller scripts, depending on which mode you select.
The recognized modes are:
all:
/Library/Developer/Shared/uninstall-devtools
/Library/Developer/4.2/uninstall-devtools
/Developer/Library/uninstall-developer-folder
xcodedir:
/Developer/Library/uninstall-developer-folder
unixdev:
/Library/Developer/Shared/uninstall-devtools
systemsupport:
/Library/Developer/Shared/uninstall-devtools
/Library/Developer/4.2/uninstall-devtools
The default value for 'mode' is 'all'.
END
exit(0);
}
####################################################################################################
# Determine if we are authorized to uninstall the devtools packages.
####################################################################################################
$| = 1;
if (($do_nothing == 0) && ($< != 0)) {
die("ERROR: Must be run with root permissions -- prefix command with 'sudo'.\n");
}
####################################################################################################
my $uninstaller_script = $0;
my ($uninstaller_dir,$uninstaller_script_basename) = parse_name($uninstaller_script);
if ($uninstaller_dir eq '.') {
die("ERROR: Must change to another directory before running this script, since the current directory is about to be deleted.\n");
}
my ($developer_dir,$developer_dir_basename) = parse_name($uninstaller_dir);
####################################################################################################
my @flags = ();
if ($do_nothing == 1) {
push(@flags,'--do-nothing');
}
if ($verbose == 1) {
push(@flags,'--verbose');
}
if ($warning == 1) {
push(@flags,'--warning');
}
if ($debug == 1) {
push(@flags,'--debug');
}
if (($mode eq '') || ($mode eq 'all')) {
run_uninstaller_script("/Library/Developer/4.2/uninstall-devtools",\@flags);
run_uninstaller_script("/Library/Developer/Shared/uninstall-devtools",\@flags);
run_uninstaller_script("$developer_dir/Library/uninstall-developer-folder",\@flags);
} elsif ($mode eq 'xcodedir') {
run_uninstaller_script("$developer_dir/Library/uninstall-developer-folder",\@flags);
} elsif ($mode eq 'unixdev') {
run_uninstaller_script("/Library/Developer/Shared/uninstall-devtools",\@flags);
} elsif ($mode eq 'systemsupport') {
run_uninstaller_script("/Library/Developer/4.2/uninstall-devtools",\@flags);
run_uninstaller_script("/Library/Developer/Shared/uninstall-devtools",\@flags);
} else {
die("Usage: $0 --mode=<all|xcodedir|shared|systemsupport>\n");
}
print("IMPORTANT: If you are going to install a previous version of the Developer Tools, be sure to restart the machine after installing.\n");
####################################################################################################
sub get_options {
while (@_) {
my $option_name = shift(@_);
my $option_pointer = shift(@_);
foreach my $arg (@ARGV) {
if ($arg =~ /^--$option_name/) {
my ($arg_name,$arg_value) = split(/=/,$arg);
$arg_value = 1 if (!$arg_value);
$$option_pointer = $arg_value;
}
}
}
}
####################################################################################################
sub parse_name {
my $name = shift;
my ($dir_name,$base_name) = ($name =~ m{^(.*/)?(.*)}s);
$dir_name =~ s|(.*)/$|$1|s;
return ($dir_name,$base_name);
}
####################################################################################################
sub run_uninstaller_script {
my $script = shift;
my $flagsref = shift;
if (-x $script) {
my @args = ();
push(@args,$script);
foreach my $flag (@$flagsref) {
push(@args,$flag);
}
system({$args[0]} @args);
}
}
####################################################################################################