diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index a32138dac7d..534cf38015d 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1383,6 +1383,21 @@ sub action_backup { } } + # if we do --clean --all we also want to remove packages that + # are not present anymore in the tlpdb, so use the readdir mode + # to determine backups + if ($opts{"all"} && $clean_mode) { + # initialize the hash(packages) of hash(revisions) + my %backups = get_available_backups($opts{"backupdir"}); + init_local_db(1); + for my $p (sort keys %backups) { + clear_old_backups ($p, $opts{"backupdir"}, $opts{"clean"}, $opts{"dry-run"}); + } + return 1; + } + + # in case we are not cleaning or cleaning only specific packages + # use the one-by-one mode my @todo; if ($opts{"all"}) { @todo = $localtlpdb->list_packages; |