Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

CPAN uninstall

by Bod (Curate)
on Jan 04, 2021 at 16:09 UTC ( #11126286=perlquestion: print w/replies, xml ) Need Help??

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

In trying to help installing WWW::Mechanize::Chrome in Strawberry Perl I was trying to install IO::Async but made a typo! I left it doing its thing whilst walking the hound and returned a little over an hour later to find lots if Tk windows popping up during the tests for one of the many dependencies that are being installed...

  1. Is there a simple way to see all the modules that have been recently installed?
  2. Is it possible to delete (some of) them?
  3. Does it matter that there are modules installed that I don't know what they are or what they do?

Disc space is not at a premium so I an sort of assuming that all these modules will just sit there worrying nobody so long as I don't actually use them.

Edited to correct typo in question and to add that the typo I initially made was cpan --force install IO::ASnyc

Replies are listed 'Best First'.
Re: CPAN uninstall
by 1nickt (Abbot) on Jan 04, 2021 at 16:37 UTC

    Besides the advice to use cpanm I suggest using perlbrew and its lib function to manage your Perl dependencies. E.g. install Perl 5.32 using perlbrew, then DO NOT INSTALL ANY MODULES. Create a perlbrew lib, e.g. perl-5.32.0@my-project, and install your dependencies into that library. In the future you can create new libs and start over, trash your existing libs with perlbrew lib delete, etc., all without reinstalling Perl.

    Hope this helps!

    The way forward always starts with a minimal test.
Re: CPAN uninstall
by marto (Cardinal) on Jan 04, 2021 at 16:24 UTC

    Use cpanm. It lets you uninstall modules. Without writing something yourself or just examining your file system nothing springs to mind to list recently installed modules.

    Does it matter that there are modules installed that I don't know what they are or what they do?"

    If you uninstall a dependency (or a dependency of a dependency) of a module you rely on, expect problems.

      isn't there a perllocal.pod somewhere being updated by cpan?

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

        Yes. perldoc perllocal will list all the locally-installed (ie. non-core) modules ordered by time of installation. It should be updated by any installation method including your O/S package manager, cpan, cpanplus, cpanminus, make install, etc.


        isn't there a perllocal.pod somewhere

        Yes! Found it thanks :)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11126286]
Approved by marto
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-01-19 21:12 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.