How to Delete Files From Linux: Commands, Options, and What to Know Before You Start

Deleting files in Linux is straightforward once you understand the tools available — but it's also one of those tasks where a single wrong command can cause real problems. Unlike Windows or macOS, Linux doesn't always ask "are you sure?" before permanently removing something. Knowing which command to use, and when, makes a meaningful difference.

The Core Command: rm

The standard tool for deleting files in Linux is rm (short for "remove"). At its most basic: