Unable to delete my test directory in the terminal


Hey there. I’m currently learning the command line basics and created the directory “test”. Now I want to delete it again, but if I type in rm test while I’m in the same directory as the test directory, it just says rm test “rm: test: is a directory”

Can anyone tell me what I’m doing wrong?

Thanks in advance:)


rm -d dirname will remove an empty directory. rm -r dirname will remove a directory that has files in it. When you created “test” did you use the touch or mkdir command?


Hey, thank you so much:)) I used the mkdir command


You’re very welcome. I started using Linux a couple of months ago when I started and I still have to look up how to do things I don’t use very often. :slight_smile: