How can I delete a hidden folder?

38,041

You can remove hidden directories (with . at the beginning of the name) like normal directories:

rm -rf .directory_name

(r for recursive, f for force).

To display hidden directories use -a option for ls:

ls -a

You can also use mc or some other file manager to remove them. Most of them will have option to display hidden directories in View menu or in settings. In mc hidden directories are displayed by default.

Share:
38,041

Related videos on Youtube

Pedrom
Author by

Pedrom

Professional CMS TYPO3 and Full Stack developer. If my answer is helpful please consider to donate: eth:0x6a0c4dda92ace3ec82fb4a2810091fd17539edb6 Fashionreps WatchExchange phpclasses Jsclasses Codeplex Github I am nerdier than 44% of all people. Are you a nerd? Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum! #SOreadytohelp

Updated on September 18, 2022

Comments

  • Pedrom
    Pedrom almost 2 years

    I want to delete many configuration folder in my home user folder but I can't figure out how to delete them. How can I delete a hidden folder?

  • Kevin
    Kevin about 12 years
    Better not to get in the habit of using -f. You should really only use it if you're expecting many read-only files (e.g. in a .svn folder).