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.
?
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 (e.g. if you have no perlbrew-managed installations left):
perlbrew switch-off
It can be reinstated using perlbrew switch
.
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}