sudo: unable to execute /bin/rm: Success
Problem
When trying to delete a bunch of files using something like sudo rm *, I get this error:
sudo: unable to execute /bin/rm: Success
Solution
This is caused by a buffer overflow when expanding the *. Instead, use find. Here’s an example:
sudo find . -name '*' -exec rm {} \;
Note that the wildcard (*) is enclosed in single quotes which will (unlike double quotes) prevent it from expanding.