MEHDI>_
HireWorkBlogContact
Book a Call
Published on
Tuesday, September 16, 2025

Remove a file with rm

Authors
  • Mehdi Akiki avatar
    Name
    Mehdi Akiki
    Twitter

Delete a file:


rm file.txt
# interactive prompt
rm -i file.txt

Use -r for directories and -f to force.

I build and scale reliable production systems. Open to full-time and freelance work with U.S.-based teams that value ownership and execution.

Got something in mind?

Book a Discovery Call

Tags

bashtil

Previous Article

Reverse-search history

Next Article

Today I Learnt: Read user input in bash
← Back to the blog
Subscribe to the newsletter
mailMailgithubGitHublinkedinLinkedinxX
Mehdi Akiki
•
© 2026
•
mehdi.cz
Crafted with ❤️ by yours truly