Last Updated: February 25, 2016
·
17.24K
· ksi

Perl: uninstall perl cpan module

Unfortunately, there is no cpan remove or cpan uninstall command. What you can do:

cd ~/.cpan/build
cd Module-To-Be-Uninstalled-VERSION-xyz
make uninstall
# follow instructions (copy commands) since it often doesn't really perform the uninstall

If you find several "versions" of your Module for whatever reasons, you should

find ~/.cpan/build/Module-To-Be-Uninstalled* -name Makefile

and change into to mentioned directory.

I think I have to write a bash function or alias for that...

2 Responses
Add your response

Also note that there's CPANPLUS library which provides cpanp script.
You can use cpanp to delete installed packages:

cpanp -u POE

However, you need to have CPANPLUS installed to perform this.

over 1 year ago ·