749
submitted 7 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 30 points 7 months ago* (last edited 7 months ago)

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 7 months ago

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

[-] [email protected] 7 points 7 months ago
this post was submitted on 12 Feb 2024
749 points (97.3% liked)

linuxmemes

20776 readers
479 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