protected void when_cleaning_package(string name, string version) { repository.RefreshPackages(); clean_result = repository.Clean(repository.PackagesByName[name].Where(_ => _.SemanticVersion != version.ToSemVer()) .Concat(repository.PackagesByName.Where(_ => _.Key.EqualsNoCase(name) == false).SelectMany(_ => _))).ToList(); }