In CompUnit::Repository::Installation§

See primary documentation in context for method uninstall

method uninstall(Distribution $distribution)

Removes the $distribution from the repository. $distribution should be obtained from the repository it is being removed from:

my $inst-repo = CompUnit::RepositoryRegistry.repository-for-name("site");
my $dist = $inst-repo.candidates("Acme::Unused").head;
$inst-repo.uninstall($dist);