Terminal will then ask you whether you’re sure you want to delete the file.
Just use -i after the rm but before the first filename, like this: rm -i. Surprised there was no confirmation before your files were deleted? Luckily there’s a way to add one as a safeguard for not deleting the wrong file by accident.
Navigate directories in your Mac and repeat the process as many times as you want. Now all the files you specified after rm are gone for good.
How to use delete file command line feature Just take a look at the sheer amount of files it unearthed.
Among other things, this app has an impressive System Junk detector. When you download CleanMyMac X (this free version is notarized by Apple), you need to click on System Junk. To dig these files out, try a free version of CleanMyMac X. Still, deleting them could give your Mac an extra boost - that's because they are outdated and clutter your macOS. These are such files as logs, broken downloads, caches, remains of old apps, etc. Some files are hard to delete in a normal way because they sit deeply in system folders. While it lets you avoid any error messages, it also removes the files completely, without any possibility of retrieving them later on. Note: The Mac command line delete file feature is final and irreversible.