Linux command line to delete all files and folders in current directory

In Linux, “cd” your way to the directory you want to completely clean out, then type:

$  rm –rf *

I suggest going into the directory first, then “ls” to list the contents so you can see what you’re deleting before using this command, though! Just a reminder, the prompt symbol is the “$” you don’t type that, on PCs or Macs it’s sometimes a % symbol instead.

About Author:

Senior Cloud Software Engineer and 25+ years experienced video production, video editing and 3D animation services for a variety of global clients including local video production here in Jacksonville, Florida.

Leave a Comment

Your email address will not be published. Required fields are marked *