开发者

How do I uninstall Perl modules?

I installed some Perl modules in my Linux machine. If I enter perldoc perllocal it shows a list of Perl modules installed in my machine, but now I don't 开发者_开发问答need those Perl modules, so I want to remove them.

Does anyone know how to uninstall or remove those modules installed in Linux (debian 2.6.26)?


The Perl installers are just that... installers. They don't verify that they're not overwriting existing files, and they don't record precisely what they install. Therefore, they cannot uninstall. If you want a proper packaging system, you can't use the Perl installers.


If you use CPANPLUS to install a module, you can (at least in theory) also use it to uninstall it:

$ cpanp
...
> u Unwanted::Module
...
> q
$

The older CPAN module does not support an uninstall option. And, as Randal Schwartz notes, uninstalling modules is not always reliable.


Use cpanp (its uninstall is not limited to cpanplus-installed modules), or see ExtUtils::Packlist's modrm example.

Uninstall tools have historically been not readily provided because the install process is not robustly reversible, as Randal cautions.


As I've mentioned somewhere else on SO, my answer is to just leave them. There are VERY few Perl modules large enough to take up any actual space on you system. I'm not saying don't try if you really need the space, but if you don't ... its not worth it.


You can try App::pmuninstall

DESCRIPTION

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

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


I tried cpanp uninstall and it didn't work for me. I did find success using App::pmuninstall.

pm-uninstall [options] Module ...

pm-uninstall - Uninstall modules - metacpan.org

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜