5

I have Carton environment and install modules into ./local/ from cpanfile. But now I do not require some modules and want to remove some.

I can remove ./local folder and install modules from scratch but this take a time. I have found this

carton uninstall Module

But it does not exists anymore.

Is there something like carton uninstall?

Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158

1 Answers1

2

I workaround I just delete local folder and install modules from scratch:

rm -r local
carton

UPD

Note: This can take a while to install from scratch.

Thus to save time you can pass --notest option to cpanm via PERL_CPANM_OPT:

PERL_CPANM_OPT=--notest carton

Or if you you want to prevent querying for new versions:

carton install --deployment

This will install modules without testing them. This is safe in compare to previous command because you know that module was installed before (tests were PASS)

Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
  • that solution is not ideal. If you have lots of installed modules, it will take forever to reinstall them – Petru Oct 02 '18 at 10:20
  • 3
    @Petru: This is the only way for now. Alternative was not proposed for two years. So it is not worth downvoting – Eugen Konkov Oct 02 '18 at 13:15
  • @Petru: Now days you can use `cpm` it installs very fast. A couple of minutes for about 400 modules ;-) – Eugen Konkov Jun 23 '22 at 17:21