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]



pm-uninstall [options] Module ...
  -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)


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

Hope that helps! ;)