Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tel851

macrumors newbie
Original poster
Feb 22, 2017
14
1
Sydney,. Australia
I have tried everything that I could find online to delete a file in my Trash without success. Here are all the messages I get when trying to delete the file...The operation can't be completed because the item "ConfigurationProfiles" is in use. Next, The operation can't be completed because the item "db" is in use, next, The operation can’t be completed because the item “0” is in use. Next, The operation can’t be completed because the item “gw3r1yzx2x1fk1d3pgc5_qym0000gn” is in use. Next, The operation can’t be completed because the item “l3” is in use. Next, The operation can’t be completed because the item “0” is in use. Next, The operation can’t be completed because the item “zyxvpxvq6csfxvn_n00000y800007k” is in use. Next, The operation can’t be completed because the item “zz” is in use. Next, The operation can’t be completed because the item “folders” is in use. Next, The operation can’t be completed because the item “var” is in use. Next, The operation can’t be completed because the item “private” is in use. Next, The operation can’t be completed because the item “Macintosh HD” is in use. Finally, The operation can’t be completed because the item “2018-05-14” is in use. The final message is the file I'm trying to delete.
This is a backup file I tried to delete to give me space on my hard drive. When I click Get Info on this file it says there are Zero bytes on disk.
So how can I delete this file from Trash?
 
this happens to me when i have tired to delete files that from a usb drive to ensure the the space on the drive is in fact released.
but in my case, every time i have received that can't delete message for a file i have been able to click either of the two messages that allow it to continue, sometimes i need to click it many times, as in yr example, then, when it gets to the end, i simply use finder and open Trash, then use Empty to get rid of the all of the ones that couldn't be deleted the first time.
always has worked as this, for me. every time.
all of the above is done while the usb is mounted. unmounting during any of the above sometimes has resulted in the usb actually not releasing the space even though the items are not found in the usb finder. in which case i have found that i need to actually reformat the entire usb.
 
Last edited:
Terminal:
sudo lsof | grep "gw3r1yzx2x1fk1d3pgc5_qym0000gn"

You will see which process uses the file.
Kill the proces from terminal or Activity Manager and empty the trash. You might want to be quick, as most probably the process will restart immediately.
 
Two things cause trash cleanup to fail. A drive that is no longer connected will fail because when you "Trash" items, you put a link the to original file in the Trash, so when you run Empty, it fails to find the file.

Second is when files are in use. The lsof that @hwojtek mentions is one way, but if the process locking up the files persists (restarts itself), it will be a frustrating race. You could try booting in safe mode, which may not start the service using the files you are trying to delete. In this case, just a simple empty trash would take care of it.

By backup files, are you referring to Time Machine? If so, there generally is no reason to manually delete these. TM will purge old stuff to make room for new backups. If your intent was to "start over" with TM, reformatting the drive is a better way to do things. And, if you want to limit TM so you can use the drive for other data, partition it so the TM partition is limited to a certain size, and let it purge itself.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.