Wednesday, October 2, 2013

HOWTO Remove/Uninstall Perl Modules

I've been struggling on this matter, and the solution below is what it helped me to cleanly Remove/Uninstall Perl Modules.


To Uninstall PERL Modules we will need first to Install App::pmuninstall

Also, we will need to install the library: libjson-perl if it's not already installed in your server.
root@anneke:~# apt-get install libjson-perl

Install App::pmuninstall module

To install the module we will use this command:
root@anneke:~# perl -MCPAN -e shell
 

Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.
cpan[1]>install App::pmuninstall

... [output trunked]

cpan[2]>quit


Usage:

pm-uninstall [options] Module ...
options:
  -v,--verbose                  Turns on chatty output
    -f,--force                    Uninstalls without prompts
    -c,--checkdeps                Check dependencies (defaults to on)
    -n,--no-checkdeps             Don't check dependencies
    -q,--quiet                    Suppress some messages
    -h,--help                     This help message
    -V,--version                  Show version
    -l,--local-lib                Additional module path
    -L,--local-lib-contained      Additional module path (don't include non-core modules)


Example:

root@anneke:~# pm-uninstall DBD::Oracle

Hope that helps! ;)