Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am Perl beginner. I wanted to use Log::Log4perl module as I am familiar how it works in Java. I used cpanm script to download module, but I ran it without "sudo". Then it installed this module to my dir /home/amer/perl5. Afterwards, I installed it as sudoer, but I want to remove installation in my home dir to avoid any conflicts in future. How can I do that? Here is my cmdline execution stack.

Thanks and Regards!

share|improve this question

4 Answers 4

That's quite experimental for the moment being, but now cpanm supports an uninstall option. From MetaCpan :

-U, --uninstall

EXPERIMENTAL: Uninstalls the modules. Will remove the distribution files from your library path using the .packlist file. When used with -l or -L, only the files under the local::lib directory will be removed. NOTE: If you have the "dual-life" module in multiple locations (i.e. site_perl and perl library path, with perl 5.12 or later), only the files in site_perl will be deleted. If the distribution has bin scripts and man, they will be kept in case the core installation still references that, although there's no guarantee that the script will continue working as expected with the older version of .pm files.

share|improve this answer

Try App::pmuninstall

DESCRIPTION

App::pmuninstall is a fast module uninstaller. delete files from .packlist.

App::cpanminus and, App::cpanoutdated with a high affinity.

share|improve this answer

From your user account go to shell/command prompt, enter PPM. When PPM opens type "remove [package name]" this will uninstall that particular package for you. type "help remove" in PPM for more details.

share|improve this answer
    
What if I don't have ppm? What's the package name on redhat based distros? –  ZeC Apr 26 '12 at 13:31
    
I am little confused with your question. You mean "RPM" the redhat package manager or are you asking how to remove the package on redhat ? –  Chakri Apr 26 '12 at 14:06
    
What do you mean by PPM? I am not working with rpm packages here at all. –  ZeC Apr 27 '12 at 5:49

I have tried App::pmuninstall and it is worked for me fine.

Install module using command:

$ 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

...

cpan[2]>quit

Usage.

On my local machine it has installed to /home/taras/perl5/bin/pm-uninstall

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)

Module website is: https://metacpan.org/release/App-pmuninstall

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.