http://qs321.pair.com?node_id=180737

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

Hi all
Can anyone explain me how to uninstall module from system? I'm using CPAN module for install. What should I use for module uninstall?

Replies are listed 'Best First'.
Re: Uninstall module
by Abigail-II (Bishop) on Jul 10, 2002 at 13:21 UTC
    There are two ways: first, remove the files by hand (you can use the packlist to see which files need to be removed). Second,
    perl Makefile.PL make uninstall
    from the directory you got after untarring the module. However, I think uninstalling isn't well supported, and it might be that it will actually advise you to do the first method instead.

    I've asked one of the authors of CPANPLUS for an uninstall mechanism, but I didn't get the impression I could convince the author of the desirability of it.

    Abigail

Re: Uninstall module (no automated process, manual only)
by ybiC (Prior) on Jul 10, 2002 at 13:27 UTC

    Afaik, there's no automated way to uninstall CPAN modules.

    So that leaves you with manually finding and removing all files associated with the module.   As an example, here are the files+dirs I'd rm from my Debian Linux host if I wanted to 'uninstall' the Net::Telnet::Cisco module:

    • /usr/local/man/man3/Net::Telnet::Cisco.3pm
    • /usr/local/lib/site_perl/i386-linux/auto/Net/Telnet/Cisco
    • /usr/local/lib/site_perl/Net/Telnet/Cisco.pm
    • /usr/local/lib/site_perl/auto/Net/Telnet/Cisco

    It took just a couple minutes weeding out results of find / -name Cisco to arrive at this list.

        cheers,
        Don
        striving toward Perl Adept
        (it's pronounced "why-bick")
Re: Uninstall module
by aseidas (Beadle) on Jul 10, 2002 at 13:22 UTC
    Hey ph0enix this node should help you. Although I have not tried it, it looks like all you need to do is remove all of the files contained in the packlist file of the module you want to get rid of.

    -Aseidas
can't with CPAN
by cebrown (Pilgrim) on Jul 10, 2002 at 13:20 UTC
    Hi,

    I don't think CPAN supports this (at least it is not in the documentation for the module).

    If you are trying to cleanly reinstall a module, you can do

    make install UNINST=1

    Note there are some risks to that, do "perldoc CPAN" for more information.