Making the Comprehensive Perl Archive Network work for you

Menu

Clean up your CPAN directory programmatically

There’s a semi-automated way to clean up your PAUSE author directory using the WWW:::PAUSE::CleanUpHomeDir module by Zoffix Znet. Steve Haryanto modified the example slightly to take the PAUSE user name and password from a configuration file. His cleanup-pause-homedir is in his Github account.

All of your uploads to PAUSE stay in your author directory until you delete them. All of these files also show up on the CPAN mirrors. If we never cleaned out these directories, a mirror would be need about 15 GB to store it all. CPAN started in the early 1990s, so that’s a lot of history to collect.

PAUSE has an interface to delete old distributions that you don’t need anymore. You can get rid of experimental versions and older distributions. Some authors prefer to keep the previous two older distributions as well as the most current one. The PAUSE interface actually schedules the files for deletion and gives you about three days to change your mind.

You’re only deleting the files from PAUSE, though. They are still collected in BackPAN, which is a CPAN mirror that only adds, almost never deleting.