[go: up one dir, main page]

Menu

#19 make uninstall results in "rm -rf / "

v1.0_(example)
open
nobody
danger (1)
9
2015-03-10
2015-03-10
Paul Nasca
No

"make uninstall" can be very dangerous because of "rm -rf" from Makefile (from version 3.6). It tried to remove everything.

This happened when tried to uninstall.

$ sudo make uninstall
Deleting binary and manpages...
rm -rf /
rm: it is dangerous to operate recursively on ‘/’
rm: use --no-preserve-root to override this failsafe
make: *** [uninstall] Error 1

Whew! o_O

The issue is at the line 106 from Makefile
"rm -rf $(BTBINDIR)/"
BTBINDIR does not exist

if it was $(BINDIR) (instead of BTBINDIR) the command could become "rm -rf /usr/bin" and it could work (i.e. delete everything from /usr/bin/ ).

I suggest you to remove any "rm -rf" from Makefile and remove only the added files.

Discussion


Log in to post a comment.