Home Tutorials Hack app How to empty trash on a Mac

How to empty trash on a Mac

2
SHARE


In most cases, deleting a file on a Mac is easy, however, under most circumstances deleting a file will nearly move it to the trash, which you will then need to empty. Emptying the Trash can also be simple, except on a few occasions. There are a few reasons why your Trash won’t empty that we will examine below, along with sharing some ways to force your the Trash on your Mac to empty.

Some of the issues that will stop your Trash from emptying, or stop your Mac from deleting a file, include: when a file is being used by an application, if a file is locked, or if you don’t have sufficient privileges. Read on to find out how to solve your Mac Trash problems.

How to delete a file on a Mac

There are a few ways to delete a file on a Mac:

  • Drag and drop it on to the the trash icon in the dock.
  • Right-click on it and choose Move to Trash from the options.
  • Click on the file and press Command + Delete to move it into the Trash.

However, these methods won’t actually delete anything, the files will remain in your Trash until you delete them for good. This is a good way to make sure you don’t accidentally delete something you need, but if you actually want to recover some storage space then you will need to know how to delete files from your Trash.

How to delete files from the Trash

Deleting files from the Trash isn’t usually hard:

  • Click on the Trash icon in the Dock and choose Empty Trash.
  • Or, empty the trash by pressing three keys consecutively: Command + Shift + Delete.

You should see a warning: “Are you sure you want to delete the items in your Trash” because you can’t undo this action, but assuming you do want to delete, once you click Empty Trash you should be free of them.

READ  How to back up photos on iPhone

You can actually bypass the “Are you sure you want to permanently erase the items in the Trash?” step, by pressing:

  • Command + Option/Alt + Shift + Delete

How to delete immediately

You can actually bypass the Trash altogether and delete a file immediately.

  1. Click on the file you want to delete.
  2. Press the following keys: Option/Alt + Command + Delete.

How to delete if an item is in use

If you are trying to empty your trash and you see a warning that an item is “in use” by another application you have a few options.

You could delete everything except that item, just click on Continue or Skip to skip through the items that can’t be deleted. However, you will be left with the offending items in your Trash.

Here are a few solutions to delete an “in use” file from the Trash:

  • Quit the app that you think might be using the file (or quit all open apps if you aren’t sure). You should now be able to empty the trash.
  • If that doesn’t work the app may still be using the file for a background process. In that case, try restarting your Mac then attempt to empty the trash.
  • If that doesn’t work, check to see if there is a startup item that is using the file, or just start up the Mac in Safe Mode – which will stop any Startup items running. Now you should be able to empty your trash and delete the file.

If you want to try and identify which application is using the troublesome file, you could try the following Terminal Command:

  1. Click on the Trash so that a Finder window opens up.
  2. Now open Terminal and type lsof (followed by a space).
  3. Don’t press return.
  4. Drag the file that’s in use from the Trash to the Terminal window.
  5. Now press return.
  6. You will see a list of the applications and processes using the file in the Terminal window.
READ  Mac keyboard shortcuts you need to know

If it’s an application, quit it. If it’s a background process that’s using the file, open Activity Monitor and terminate the process.

Moving locked files to the trash

You may have difficulty deleting a file if it’s been locked.

Locked files display a lock badge in the lower-left corner of their icons.

  1. To unlock the file, right-click or control-click on the file in the Finder and choose Get Info, or click on the file and press Command-I.
  2. Open the General section (below Add Tags).
  3. Deselect the Locked checkbox.

Deleting a file if you have insufficient privileges

You may not have sufficient privileges to delete a file. In some cases this is a good thing – if it’s a System-related file you are attempting to delete then you probably shouldn’t.

However, if you do think that you can safely delete the file, you adding your Name in the Sharing & Permissions section and give yourself permission to Read & Write.

Deleting files off an external drive

Deleting files on an external hard drive or flash drive can be tricky. There are a few reasons for this:

Some networked volumes don’t support Trash, so if you delete a file it will be immediately removed. In that case, you will see a message that Finder wants to delete the file, and you will be asked for your Password. Enter that, click OK.

However, sometimes when you think you have deleted a file from an external drive you will find you haven’t deleted it at all. This is because when you delete anything from an external drive you may also need to delete it from the Trash, and the only way to do that is to empty the trash on your Mac in the usual way. If you eject the external hard disk or flash drive before emptying the trash the files will remain on the drive.

READ  How to change email sender name in Apple Mail

What if you don’t want to delete your trash in order to delete the trash on an external drive?

A locally attached drive actually has its own, hidden trash folders, named .Trashes at root level. You can use Terminal to locate these, and delete them, using the method outlined below.

There’s one other reason why you might not be able to delete a file on an external drive. If there is a problem with the drive itself then you can use Disk Utility to repair the disk.

Open Disk Utility and find the disk with the rogue file. Use First Aid and repair the disk. Now when you restart you should be able to empty the trash, hopefully. Read about using Disk Utility here.

Deleting the Trash via Terminal

If you are happy using Terminal, you may be able to delete your Trash by following the below instructions:

  1. Type of copy the following into Terminal: sudo rm -R (there needs to be a space after the R)
  2. But don’t press enter.
  3. Now Control-click on your Trash icon to open it.
  4. Select the files in your trash.
  5. Drag them to the Terminal window.
  6. Now press Enter
  7. Enter your administrator password (it won’t show up)
  8. Hit Enter



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here