Cannot remove symlink to a directory
December 18, 2021
You need to tell it to delete a file, not a directory, the slash at the end of the name of the file makes the shell interpret it as a directory, example below:
# this works
rm foo
# versus this, which doesn't:
rm foo/
Special thanks to Matthew Scharley for his insightful answer on StackOverflow