How to delete a folder in UNIX starting with dash/s (-)

Recently while working in Linux, accidentally I created a folder named “–versionset”. I was quite a tuff task to delete the folder as this name is parsed as option to rm command. After searching a bit found a solution in stackoverflow to disable dashes during the parsing. Here is the command you need to use to remove a file starting with dashes.

rm -rf -- --versionset

— in the command deactivates the parsing the dashes in the file name.