For example, it can be used to create an app to delete files and folders without sending them to the Trash. Automator is a sort of very simple programming language that is bundled with macOS and it can be used to create all sorts of apps.
![how to delete files on mac desktop how to delete files on mac desktop](https://cdn.osxdaily.com/wp-content/uploads/2019/07/how-delete-individual-file-trash-mac-2.jpg)
No-one wants to be bothered with typing complicated Terminal commands every time they want to delete a file, so here is a much better method. However, there is an even better way and we can use an Automator app. It saves typing it and you will not get any errors this way. The potential for typing errors when entering filenames and paths is great and you could enter the wrongfile or folder, so after typing rm –rfP (and a space), drag the file or folder from a Finder window and drop it on the command line in the Terminal window to automatically insert the path. The extra command line switch P, tells the rm command to overwrite the file three times before deleting it, to ensure it cannot be recovered by anyone. The f means ignore non-existent files and never prompt, or in other words, just get on with it and don’t bother me. The –rf are command line switches and r means work recursively, so if filename is a folder, which contains another folder, it will dig down through them deleting all the files in the folder and subfolders. A slight modification of this command is: Where filename is the name and path of the file or folder that you want to delete.
HOW TO DELETE FILES ON MAC DESKTOP MANUAL
We will be using the rm command and typing man rm shows the manual if you want to read up about it. This opens a command prompt window on the desktop. To see how this works, go to the Applications/Utilities folder and run Terminal.
![how to delete files on mac desktop how to delete files on mac desktop](https://www.easeus.com/images/en/screenshot/data-recovery-mac/recover-deleted-files-via-put-back.png)
Delete files from the Terminalįiles can be deleted from a Terminal command prompt and they can be overwritten to destroy any data they contain before being deleted. People often don't encrypt external drives. This is good, but it does not securely delete a file and it might be recoverable, especially if it is on an external hard disk drive or thumb drive.
![how to delete files on mac desktop how to delete files on mac desktop](https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2020/08/optimizing-storage-on-mac-icloud-01.jpg)
There are solutions and one method is to select one or more files or folders, click the File menu, hold down the Option key and select Delete Immediately. Emptying the Trash means that lots of other files that you might discover you actually need, are removed too.
HOW TO DELETE FILES ON MAC DESKTOP FREE
Unfortunately, this does not free up disk space because the files are simply moved to the Trash folder on the disk. You decide to delete them to free up disk space, so you drag them to the Trash. What's more, suppose you have a whole group of files, such as raw video footage that you no longer need. Glad that is fixed these days, however, it could still be simpler than deleting, opening the Trash, finding the file and deleting it again. Emptying the whole Trash just to get rid of one file was crazy. The reason for the Trash folder is so that files can be recovered if you discover that you really needed one that was deleted. Not so long ago you could not do this and you had to empty the whole Trash just to get rid of one file!
![how to delete files on mac desktop how to delete files on mac desktop](https://i.ytimg.com/vi/cNuuiJuj0f8/hqdefault.jpg)
You must open the Trash, find the file you deleted and then Ctrl+click it and select Delete Immediately. You can empty the Trash, but that deletes all of the files in it, which still leaves the question, how do you delete one file? Of course, everyone knows that to delete a file you just drag it to the Trash, but that is not deleting it, it simply moves it to another folder on the disk. How do you delete a file in macOS on the Apple Mac? You might think it is a simple question, but there is more to it than that and files deleted that way can be recovered.