text stringlengths 0 834k |
|---|
will delete packages 4, 5, 6, and 7 from your target. You can also skip |
packages: |
remove 3-5, 7 |
this will delete packages 3, 4, 5 and 7, but will leave 6 intact. |
Remember to run a new query whenever you remove a package from your |
target. |
If you specify the package as a URL, PPM determines the package name |
from the URL and removes that. |
Please note that wildcards like ""*"" or ""?"" cannot be used with the |
remove command. |
See Also |
profile |
END |
sub comp_uninstall { goto &comp_properties; } |
sub run_uninstall { |
my $o = shift; |
my @args = @_; |
trace(1, ""PPM: uninstall @args\n""); |
# Get the force option: |
my ($force); |
{ |
local @ARGV = @args; |
GetOptions( |
'force!' => \$force, |
); |
@args = @ARGV; |
} |
my $args = $args[0]; |
# No Args -- removes default package |
my $n_results = $o->cache_sets('query'); |
my $n_current = $o->cache_set_current('query'); |
my $ind = $o->cache_set_index('query'); |
unless (@args) { |
unless ($n_results and bounded(0, $n_current, $n_results - 1)) { |
$o->warn(""No query results to uninstall -- "" . |
""use 'query' to find a package.\n""); |
return; |
} |
else { |
my @results = $o->cache_set('query'); |
if (bounded(0, $ind, $#results)) { |
my $n = $ind + 1; |
$o->inform(""Package $n:\n""); |
$o->remove_pkg($o->cache_entry('query', $ind)->name, $force); |
} |
else { |
$o->inform(""Package 1:\n""); |
$o->remove_pkg($o->cache_entry('query', 0)->name, $force); |
} |
} |
} |
# Args provided |
else { |
# Uninstall a particular number: |
if (my @r = parse_range(@args)) { |
unless ($n_results and bounded(0, $n_current, $n_results - 1)) { |
$o->warn(""No query results to uninstall -- "" . |
""use 'query' to find a package.\n""); |
return; |
} |
else { |
my @results = $o->cache_set('query'); |
my $npkgs = @results; |
my $ok = 0; |
for my $n (@r) { |
if (bounded(1, $n, $npkgs)) { |
$o->inform(""Package $n:\n""); |
$ok |= |
$o->remove_pkg($o->cache_entry('query', $n-1)->name, |
$force, 1); |
} |
else { |
$o->warn(""No such package $n in result set.\n""); |
} |
} |
$o->cache_clear('query') if $ok; |
} |
} |
# Uninstall a particular package |
else { |
if ($o->conf('target')) { |
$o->remove_pkg($_, $force) for @args; |
} |
else { |
print |
""No targets -- use 'rep add' to add a target.\n""; |
return; |
} |
} |
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.