On Linux, how do I remove the version of Perl that was built from the source code?

I need to remove the version of Perl that was built from the source code. The catalog from which it was built exists. However, I did not find a make target called delete. I have Perl version 5.12.2 and installed on Fedora distributed by Linux.

+4
source share
4 answers

Since perl does not have a “make uninstall” purpose, you need to delete the files manually. The best way to do this is to get a complete list of installed files. For this you need:

  • Create a temporary directory e.g.. / Usr / local / src / temp / perl
  • Edit the Makefile in the perl source directory (I hope you didn’t delete it) and add the path from step 1 above to the beginning of all installation lines (e.g. bin = ..., scriptdir = ..., INSTALLPREFIXEXP = ...)
  • Run make install
  • Go to temp directory and run: find . -type f > filelist.txt find . -type f > filelist.txt
  • Edit this file and make sure you really want to delete eveything there (you will ruin your system very badly if you ruin it)
  • Run cat filelist.txt | xargs rm cat filelist.txt | xargs rm
  • Manually delete the perl5 library directory (usually with something like / usr / local / lib 64 / perl5 - you can find it in filelist.txt)

What is it, everything has passed.

Next time, select it in a separate directory and just bind it :-)

+4
source

If Perl is installed in its own directory - say /opt/perl/v5.12.2 - and was built from the source, then the "final sanction" works well:

 rm -fr /opt/perl/v5.12.2 

I almost always create my own Perl; I always create my Perl, so it is installed in my own, unique directory; when I finally get around to removing it, that’s how I do it.

+2
source

Method which

  • It is supposed to install in the /usr/local subtree,
  • no assembly directory required
  • slightly less accurate

Run the following command,

 sudo find /usr/local -name '*perl*' -or -name 'pod2*' -or -name '*cpan*' -exec rm -rf {} \; 
0
source

If you still have a source, you can delete it using:

 make uninstall 

while you are in the source directory.

Btw, I suggest using checkinstall the next time you install from source. See this

If you (as you said ...) did not delete the target, you may have to delete it manually.

-1
source

All Articles