Deleting a directory using the command line
The rmdir command removes an empty directory:
rmdir test
The rm command with the -R flag is used to delete directories and the contents inside them:
rm aaa -R
Be very careful with this command and always check what directory you are in. It deletes everything and cannot be undone.
Delete the folder dir using the appropriate command