I installed net-snmp by following the installation instructions at
http://www.net-snmp.org/docs/INSTALL.html
Now I want to uninstall it.
The same docs say:
7. You can remove the application by typing `make uninstall'.
That's not true.
make uninstall produces output like this:
Uninstall is unsafe and deprecated, the uninstallation was not performed. We will show what would have been done. .... .... (huge list of commands, mostly unlink) ....
several times (once for every directory recursively I guess)
And finally:
Uninstall is unsafe and deprecated, the uninstallation was not performed.
Please check the list above carefully, there may be errors.
Remove the appropriate files manually.
Manually?? YOU MUST BE KIDDING ME.
So (1) the documentation needs to be fixed, as point 7 is not true.
and most importantly (2) a working script for uninstalling must be provided.
SourceForge's shitty markdown changed my quoting of the docs, where it read "7", not "1". (besides screwing up my formatting)
OMG
https://sourceforge.net/p/net-snmp/mailman/message/16948818/
two-thousands-f***ing-six
net-snmp uses perl's MakeMaker infrastructure. MakeMaker appears to have deprecated "uninstall" in 1997, and does not seem to have replaced it.
"make uninstall" works for the non-perl portions. I know that's unsatisfying.
I was slightly misdirected by the presence of a Makefile.am and assumed that the rules were generated by automake. Turns out that the perluninstall target is simply in net-snmp's Makefile.in, and can be replaced by one similar to the pythonuninstall target:
s/python/perl/ and it'll be equally true. I'll also modify the INSTALL documentation:
Diff:
Errr... Updating the docs to reflect reality and the scripts to avoid a flood of unnecessary output is definitely an improvement for the short term, but i hope you're not saying that you're not going to address the issue of uninstalling at all!
As I mentioned, perl seems to have deprecated the "uninstall" functionality of
ExtUtils::MakeMaker
in 1997, and not yet replaced it. I do not think that the net-snmp project has the manpower to fix a perl infrastructure problem that the perl project hasn't managed to fix in 18 years.While there are newcomers like
Module::Install
andModule::Build
, they reduce portability because they need to be installed separately or need a newer version of perl - and it's not clear that they solve the uninstall problem. E.g.,Module::Build
has extensive documentation as to what you can do with it, and it doesn't mention uninstall.When searching for solutions to this, I did come across several recommendations to use cpanminus:
Install
App::cpanminus
using CPAN (use:cpan App::cpanminus
)Type
cpanm --uninstall Module::Name
Of course, that means coming up with a list of module names (and finding out whether cpanm takes a list, or requires one invocation per module). I honestly have no idea how to come up with such a list; there are probably
SNMP NetSNMP::ASN NetSNMP::OID NetSNMP::TrapReceiver NetSNMP::agent NetSNMP::default_store
(I don't know which count as modules - can you just say you want to remove SNMP and NetSNMP?)
Would you consider helping to build the list of modules that you need to supply to cpanm?
Note that I no longer have cycles to work on perl-related bugs; sadly the sourceforge bug system does not let me move this bug back to "unassigned".
Bill,
I can take care of the perl-related stuff if you wish.
Thanks,
Keith