I recently created a username and a group called gamesForAdmin. Since then I deleted it and the folder I made for it is still there:drwxr-xr-x  5 root     root       4096 Jul  4 11:28 .drwxr-xr-x 23 root     root       4096 May 29 12:41 ..drwxr-xr-x  2 sftpuser sftpaccess 4096 Jul  4 11:24 gamesForAdmindrwxr-xr-x 27 ryan     ryan       4096 Jul  4 11:31 ryandrwxr-xr-x  3 root     sftpaccess 4096 Jul  4 11:29 sftpuserWhen I try to run a sudo rmdir gamesForAdmin, I get this error message:rmdir: failed to remove gamesForAdmin: Directory not emptyBut theres nothing in the directory! When I run an ls, there is nothing listed.Why does this occur?How I can successfully remove this directory?Output of ls -la gamesForAdmin:total 28drwxr-xr-x 2 sftpuser sftpaccess 4096 Jul  4 11:24 .drwxr-xr-x 5 root     root       4096 Jul  4 11:28 ..-rw------- 1 sftpuser sftpaccess  471 Jun  9 19:49 .bash_history-rw-r--r-- 1 sftpuser sftpaccess  220 Apr  8 21:03 .bash_logout-rw-r--r-- 1 sftpuser sftpaccess 3637 Apr  8 21:03 .bashrc-rw-r--r-- 1 sftpuser sftpaccess  675 Apr  8 21:03 .profile-rw------- 1 sftpuser sftpaccess  644 Jun  9 17:48 .viminfo
Removing a directory that has no files in it
command line;directory;ls;rm
Based on the output you're showing in your question the directory gamesForAdmin is not empty, so rmdir cannot remove this directory. To remove it you'll need to use rm -fr instead. Try this:sudo rm -rf gamesForAdminwhich should fix you right up.