简体   繁体   中英

How to remove perlbrew versions/installations?

I'm running perl-5.32.0 on an Ubuntu VM, and I keep getting this warning every time I open a new terminal:

ERROR: The installation "perl-5.30.0" is unknown.

I removed directories to old versions, which caused this error (disk space is at a premium).

I don't see a command within the perlbrew menu that can remove a version. I've run perlbrew clean which cleaned up a lot of disk space, but I still get the error.

I've thought about editing the header file

con@V:~/.perlbrew$ cat init 
# DO NOT EDIT THIS FILE
export PERLBREW_MANPATH="/home/con/perl5/perlbrew/perls/perl-5.30.0/man"
export PERLBREW_PATH="/home/con/perl5/perlbrew/bin:/home/con/perl5/perlbrew/perls/perl-5.30.0/bin"
export PERLBREW_PERL="perl-5.30.0"
export PERLBREW_ROOT="/home/con/perl5/perlbrew"
export PERLBREW_VERSION="0.86"

but given # DO NOT EDIT THIS FILE I don't think I should do that.

How can I get rid of the error ERROR: The installation "perl-5.30.0" is unknown. ?

To uninstall a perl version within perlbrew use:

perlbrew uninstall <name>

The <name> is one from perlbrew list .

The message is due to perlbrew trying to use a non-existent installation. The solution isn't removing a perlbrew-installed Perl; [1] the solution it simply to tell it to start using an existing one.

To get the list of perlbrew-managed builds and switch to an existing one:

perlbrew list
perlbrew switch {id}

To turn off perlbrew (eg if you have no perlbrew-managed installations left):

perlbrew switch-off

It can be reinstated using perlbrew switch .


  1. To answer the title question, even though it you won't help you personally here, you can use the following to uninstall a perlbrew-managed build of Perl:

     perlbrew uninstall {id}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM