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

hi monks
i want to remove all perl modules installed from CPAN
what shall i do?
please suggest to shortest way

Replies are listed 'Best First'.
Re: want to remove all perl modules
by Anonymous Monk on Oct 20, 2011 at 10:22 UTC

    Depends on how you installed, but this usually works

    rm -rfv ~/perl5

    rm -rfv $PERL5LIB

    perl -MConfig -le ' system qw{ rm -rfv }, $Config::Config{sitelib} '

    cpanp u mod1 mod2 mod3 mod4 ...

Re: want to remove all perl modules
by spx2 (Deacon) on Oct 20, 2011 at 11:57 UTC
Re: want to remove all perl modules
by pvaldes (Chaplain) on Oct 20, 2011 at 11:49 UTC
    you can run also cpan clean before