Computers, Laptops & Tablets Apple How to Delete a File in Terminal on Your Mac Use the command line to permanently delete files from a Mac by Brenna Miles Writer Brenna Miles is a technology writer with a B.A. in Business Management and HR Management. She's been writing about technology for 6+ years. our editorial process Twitter LinkedIn Brenna Miles Updated on December 30, 2020 reviewed by Ryan Perian Lifewire Tech Review Board Member Ryan Perian is a certified IT specialist who holds numerous IT certifications and has 12+ years' experience working in the IT industry support and management positions. our review board Article reviewed on Dec 06, 2020 Ryan Perian Tweet Share Email Apple Macs iPad What to Know In a Finder window, go to Applications > Utilities, type rm, space, drag the file to the Terminal window, and press Enter.You can also press Command+Space to open Spotlight, type terminal, and press Enter to access the Terminal window. In this guide, we show you how to delete a file in Terminal on Mac computers with macOS and OS X Lion (10.7) and later. What Is Terminal? Terminal is an app that comes with every Mac. It's a way to use the command line on the Mac. It allows you to modify settings, files, and other features beyond what is available in the graphical user interface (GUI). The command line offers you total command of your Mac, from the inside out. Why should you use Terminal? Here are a few of the key benefits of using Terminal for Mac: It rings true to Unix: Mac users coming over from Unix will find Terminal easier to use due to its similarity.It allows you to unlock all preference settings: Everything you can customize can be unlocked using Terminal, even things you can't access through the GUI.It cuts down on clicks: Want to move all your files from one folder to another? A few seconds of typing in Terminal is all you need, versus the time and clicks it takes to transfer files manually.It helps you remove files with ease: If you want to remove a file from your Mac forever, you can skip the Trash and use Terminal. It's quick, only taking a few seconds. The Terminal is a dangerous place if you're inexperienced in the command line. Before you enter Terminal, familiarize yourself with the basic commands. One wrong command can damage your system. How to Delete a File in Terminal on Your Mac Whether you're dealing with a problem file that refuses to leave your Mac or you want to delete multiple files quickly, Terminal makes it quick and easy. Here's how: Navigate to Terminal on your Mac by opening a Finder window and selecting Applications > Utilities. You can also press Command+Space to open Spotlight. Then, type terminal and press the Enter key. In the Terminal window, type rm and a space. Next, drag the file you want to delete into the Terminal window. Press Enter, and the file is gone forever. Want to go faster? Remove the file by entering the path to the file into Terminal, without the drag and drop. There you have it. Harness your new power to delete files easily, but remember to use it with care. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Email Address Sign up There was an error. Please try again. You're in! Thanks for signing up. There was an error. Please try again. Thank you for signing up. Tell us why! Other Not enough details Hard to understand Submit