<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Greetings,</div><div><br></div><div>I found myself needing to uninstall a few modules today and historically I would just navigate to the site perl install in my perlbrew and rm -rf the relevant files, hoping that nothing else was sharing the namespace:</div><div><br></div><div><p style="margin: 0px;" data-mce-style="margin: 0px;">[rstone@rstone 5.16.3]$ pwd<br>/home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3<br>[rstone@rstone 5.16.3]$ rm -rf Bad/Module/<br>[rstone@rstone 5.16.3]$</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">I came across a blog post at <a href="http://scratching.psybermonkey.net/2011/02/perl-how-to-uninstall-delete-perl.html" data-mce-href="http://scratching.psybermonkey.net/2011/02/perl-how-to-uninstall-delete-perl.html">http://scratching.psybermonkey.net/2011/02/perl-how-to-uninstall-delete-perl.html</a> that talks about pm-uninstall, a program similar to cpanm that takes care of this task much more efficiently.  It lists out what is going to be removed, mentions the deps, and handles man page updates (for those who use perldoc locally) as well as asks for conformation:</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">[rstone@rstone product]$ cpanm App::pmuninstall<br>--> Working on App::pmuninstall<br>Fetching http://www.cpan.org/authors/id/X/XA/XAICRON/App-pmuninstall-0.30.tar.gz ... OK<br>Configuring App-pmuninstall-0.30 ... OK<br>Building and testing App-pmuninstall-0.30 ... OK<br>Successfully installed App-pmuninstall-0.30<br>1 distribution installed<br>[rstone@rstone product]$ pm-uninstall Math::Pari Math::BigInt::Pari<br>--> Working on Math::Pari<br>Math::Pari is included in the distribution Math-Pari and contains:</p><p style="margin: 0px;" data-mce-style="margin: 0px;">/home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Math/Pari.pm<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Math/PariInit.pm<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Math/libPARI.dumb.pod<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Math/libPARI.pod<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/auto/Math/Pari/Pari.so<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/man/man3/Math::Pari.3<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/man/man3/Math::PariInit.3<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/man/man3/Math::libPARI.3<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/man/man3/Math::libPARI.dumb.3</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Also, they're depended on by the following installed dists:</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Math-BigInt-Pari</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Are you sure you want to uninstall Math-Pari? [n] y</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Successfully uninstalled Math::Pari</p><p style="margin: 0px;" data-mce-style="margin: 0px;">--> Working on Math::BigInt::Pari<br>Math::BigInt::Pari is included in the distribution Math-BigInt-Pari and contains:</p><p style="margin: 0px;" data-mce-style="margin: 0px;">/home/rstone/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Math/BigInt/Pari.pm<br> /home/rstone/perl5/perlbrew/perls/perl-5.16.3/man/man3/Math::BigInt::Pari.3</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Are you sure you want to uninstall Math-BigInt-Pari? [y] y</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Successfully uninstalled Math::BigInt::Pari</p><p style="margin: 0px;" data-mce-style="margin: 0px;">You may want to rebuild man(1) entries. Try `mandb -c` if needed</p><p style="margin: 0px;" data-mce-style="margin: 0px;">[rstone@rstone product]$ </p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">I found it quite handy and thought I'd share it for anyone else who may find themselves in a similar position.  I'm also open to any other similar tools/methods you may have used in the past.</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Happy uninstalling!</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Best Regards,</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Robert Stone</p></div></div></body></html>