Reputation: 109
I need to un-install a version of Perl which was built from source. The directory from which it was built exists. However I didn't find a make target called 'uninstall'. The Perl version I have is 5.12.2 and is installed on a Fedora distributed Linux.
Upvotes: 5
Views: 13188
Reputation: 1
A method that
/usr/local
,Run the following command,
sudo find /usr/local -name '*perl*' -or -name 'pod2*' -or -name '*cpan*' -exec rm -rf {} \;
Upvotes: 0
Reputation: 747
Because perl has no 'make uninstall' target, you need to remove the files manually. The best way to do this is to get a complete list of files installed. To do that you need to:
make install
find . -type f > filelist.txt
cat filelist.txt | xargs rm
That's it, all gone.
Next time isolate it in a separate directory and just symlink it :-)
Upvotes: 6
Reputation: 753665
If the Perl is installed in its own directory - say /opt/perl/v5.12.2
- and was built from source, then the 'ultimate sanction' works well:
rm -fr /opt/perl/v5.12.2
I almost always build my own Perl; I always build my Perl so it installs in its own, unique directory; when I finally get around to removing it, this is how I do it.
Upvotes: 2
Reputation: 8895
If you still have the source, you can remove it by using:
make uninstall
while you are in the source directory.
Btw, I sugggest to use checkinstall
next time while installing from source.
See this
If you (as you said...) dont have a target uninstall, then you will probably will have to remove it by hand.
Upvotes: -1