perlancar has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

Glancing the source code, CPAN::Mini does not seem to clean downloaded release files that are no longer indexed in 02packages.details.txt.gz, and thus slowly "becoming less mini", am I right?

Usually what I do regularly is the following: list all the files in my mirror, then compare it to the files listed in 02packages.details.txt.gz, and then remove the files in my mirror not listed in 02packages. Or, using my tool: lcpan files-unindexed | xargs rm.

(Yes, there's CPAN::Mini::LatestDistVer but this is not exactly what I want. I want a CPAN mirror that only contains indexed files.)

  • Comment on CPAN::Mini accumulating no-longer-indexed files?

Replies are listed 'Best First'.
Re: CPAN::Mini accumulating no-longer-indexed files?
by cavac (Prior) on Oct 23, 2018 at 13:25 UTC

    CPAN::Mini has a couple of problems like this. If it gets killed (for some reason or another) during download, it sometimes(?) doesn't re-download the file when restarted.

    What i usually do is to clean my local copy once or twice a year (if i notice problems or bloat) and re-download everything.

    perl -e 'use MIME::Base64; print decode_base64("4pmsIE5ldmVyIGdvbm5hIGdpdmUgeW91IHVwCiAgTmV2ZXIgZ29ubmEgbGV0IHlvdSBkb3duLi4uIOKZqwo=");'