this post was submitted on 12 Feb 2024
755 points (97.5% liked)

linuxmemes

20880 readers
5 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 30 points 9 months ago* (last edited 9 months ago) (1 children)

edit: spacing, added -rf info

The Linux rm Command: Everything You Need to Know

There's more to rm than meets the eye.

https://www.howtogeek.com/858815/linux-rm-command/


Use rm -rf to Delete Everything

If you absolutely need to delete anything and everything, just use the command:

rm -rf

That combines the -f flag, which forces deletion, with the -r flag, which will delete folders recursively. We previously included the -v argument (to make it verbose), but it isn't necessary. Just keep in mind that this is basically the nuclear option, and you shouldn't use it unless you're absolutely sure you want something gone forever.

[–] [email protected] 37 points 9 months ago (1 children)

On modern Linux versions you need to add --no-preserve-root or it won't work as nicely

[–] [email protected] 7 points 9 months ago