Skip to content

Commit

Permalink
Delete orphaned packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jul 1, 2024
1 parent 093790b commit 6525459
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ setup_universes <- function(){
lapply(deleted, delete_universe_repo, only_if_empty = FALSE)
}
}

# Remove packages that do not belong to an existing universe
orphans <- setdiff(stats$universe, universes)
if(length(orphans) > 10){
stop("More than 10 orphan universes found:", paste(orphans, collapse = ', '))
}
lapply(orphans, function(x){
try(delete_universe_repo(x))
})
}

#' @export
Expand Down

0 comments on commit 6525459

Please sign in to comment.