Skip to content

Instantly share code, notes, and snippets.

@ugexe
Last active December 17, 2016 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ugexe/65e5ad0a2b49cfc060e87d770d4c8325 to your computer and use it in GitHub Desktop.
Save ugexe/65e5ad0a2b49cfc060e87d770d4c8325 to your computer and use it in GitHub Desktop.
perl6 uninstall
use v6.c;
sub MAIN($short-name, :$ver = True, :$auth = True, :$api = True) {
my $spec = CompUnit::DependencySpecification.new(:$short-name, :$ver, :$auth, :$api);
say "Uninstalled the follow distributions:";
.say for
map { .repo.uninstall(.distribution) },
grep { .so },
map { .resolve($spec) },
grep { $_ ~~ CompUnit::Repository::Installation },
$*REPO.repo-chain;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment