That was the question I asked myself recently when I had a file called --exclude in the root of my filesystem. These commands all failed:
rm --exclude
rm "--exclude"
rm \-\-exclude
rm ??exclude
So I found the solution - so simple it embarrassed me. Just add the full path:
rm /--exclude
or tell the command line parser to stop interpreting options:
rm -- --exclude
Easy!