Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't Empty Trash With Large Number of Files

Running OS X 10.8.3


I have a very large external drive that had a Time Machine backup on the main partition. At some point, I created a second partition, then started doing backups on the new partition. On Wed, I finally got around to doing some "housecleaning" tasks I'd been putting off. As part of that, I decided to clean up my external drive. So... I moved the old, unused and unwanted Backups.backupdb that used to be the Time Machine backup, and dragged it to the Trash.


Bad idea.


Now I've spent the last 3-4 days trying various strategies to actually empty the trash and reclaim the gig or so of space on my external drive. Initially I just tried to "Empty Trash", but that took about four hours to count up the files just to "prepare to delete" them. After the file counter stopped counting up, and finally started counting down... "Deleting 482,832 files..." "Deleting 482,831 files..." etc, etc... I decided I was on the path to success, so left the machine alone for 12-14 hours.


When I came back, the results were not what I expected. "Deleting -582,032 files..." What the...?


So after leaving that to run for another few hours with no results, I stopped that process. Tried a few other tools like Onyx, TrashIt, etc... No luck.


So finally decided to say the **** with the window manager, pulled up a terminal, and cd'ed to the .Trash directory for my UID on the USB volume and did a rm -rfv Backups.backupdb


While it seemed to run okay for a while, I started getting errors saying "File not found..." and "Invalid file name..." and various other weird things. So now I'm doing a combination of rm -rfing individual directories, and using the finder to rename/cleanup individual Folders when OSX refuses to delete them.


Has anyone else had this weird overflow issue with deleting large numbers of files in 10.8.x? Doesn't seem like things should be this hard...

OS X Mountain Lion (10.8.3)

Posted on May 22, 2013 2:49 PM

Reply
Question marked as Best reply

Posted on May 22, 2013 2:51 PM

TM TRASH Issues... DELETING BACKUPS...



See Here > Should I delete old backups? If so, How?


From Here > http://pondini.org/TM/FAQ.html




If the TRASH still won’t Empty...


See Here > http://pondini.org/TM/E6.html

10 replies

May 22, 2013 3:04 PM in response to AnaMusic

I'm not sure I understand this bit:


If you're on Leopard 10.5.x, be sure you have the "action" or "gear" icon in your Finder's toolbar (Finder > View > Customize Toolbar). If there's no toolbar, click the lozenge at the upper-right of the Finder window's title bar. If the "gear" icon isn’t in the toolbar, selectView > Customize Toolbar from the menubar.

Then use the Time Machine "Star Wars" display: Enter Time Machine by clicking the Time Machine icon in your Dock or select the TM icon in your Menubar.


And this seems to defeat the whole purpose:


If you delete an entire backup, it will disappear from the Timeline and the "cascade" of Finder windows, but it will not actually delete the backup copy of any item that was present at the time of any remaining backup. Thus you may not gain much space. This is usually fairly quick


I'm trying to reclaim space on a volume that had a time machine backup, but that isn't needed anymore. I'm deleting it so I can get that 1GB+ of space back. Is there some "official" way you're supposed to delete these things where you get your hard drive space back?

May 23, 2013 7:23 AM in response to ibcoleman

In case anyone has this problem:


1) Open terminal window.


2) cd to the backupdb in the Trash folder on the external drive (i.e. 'cd /Volumes/<drive>/.Trashes/Backups.backupdb')


3) Run rm as sudo to delete the files you can delete, passing the -v param so you can actually watch progress (as opposed to watching 'Deleting -382,398 Files...' Do this like `sudo rm -rfv Backups.backupdb/`


4) Go away for a very long time until it completes.


5) After completion, there should still be a lot of garbage still floating around, but these are mostly folders with odd characters in the folder name. But if you click on Empty Trash as you normally would, the remaining files should delete fairly quickly.


Looking back on this, the real issue is the bug in how Finder counts items in the Trash. It's likely that if you just let the Empty Trash process procede, it will eventually finish. But once it goes into negative territory 99.999% of users are going to pull the plug.


The other benefit you get from just rm'ing the Trash is that the system doesn't waste a massive amount of time (incorrectly) tallying up the number of files that it's then going to delete anyway.

Nov 25, 2015 7:50 AM in response to ibcoleman

I did most of what was said before. I wanted to do a fresh Time Machine and trashed the backup folder and tried to empty, for days ! ! ! !


I removed a few files from my external drive (Western Digital Docs, etc). Using disk utility I erased the drive entirely.


After that with the drive icon selected, I did get info to check that the capacity and availble were equal. They were. The drive was empty. Fine.


I then (with the drive icon selected) opened trash and it was EMPTY!


Worked for me. So simple. 5 minutes !

Can't Empty Trash With Large Number of Files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.