Emptying the trash: An epic journey

So, I got a new computer, which is really nice — a 24-inch iMac. I transferred my old files and software, hooked it up to my old components and I was ready to go, BUT…

There was one small problem.

I use Apple’s automatic Time Machine software for backup. Even though I was backing up all the same information, the new computer didn’t want to use my old backup files. When it tried to back up, it found there was no space on my external 500GB backup drive.

No problem, I figured. I could just copy the old backup on to my new spacious 640 GB drive temporarily, until the new backups were running smoothly for a week or so, then delete those files. BUT…

There was one small problem.

There must have been a few corrupt files, because copying the files to the new computer failed.

No problem, I figured. I still had the old computer, with a “backup” of all my old files. I could safely delete my backups from the backup drive, and if something dreadful happened during that process, I’d have my old computer to use for a disaster scenario.

So I drag about 95 percent of the contents of my backup drive into the trash (I keep a few other files there besides the automated backups). BUT…

There’s one small problem.

The Mac doesn’t count your files as truly gone until you actually “empty” the trash. My backup software still doesn’t believe there is enough room on the backup drive. Now, I have a confession to make. I hate emptying the trash. It just seems so … final. What if there’s a file in there that I need? Even though my backup software keeps old versions of files, it’s always seemed easier to recover files by sifting through my trash bin. So there is probably already at least 20 GB of data in the trash bin, in addition to nearly 500 GB of backup. There’s no way to specify which hard drive’s trash to empty. I’ll have to empty it all. Of course, I still have my old computer, with its unemptied trash, so I decide to go for it. It’s about 11 a.m. Monday. I select “Empty Trash” from the “Finder” menu. BUT…

There was one small problem.

It turns out, 500 GB is a lot of trash to empty, even for a brand-new 24-inch iMac. First the computer has to “Prepare” to empty the trash. It slowly counts upwards — 100 thousand files to delete, 200 thousand, more. This is really taking a long time. I decide to go use my other computer for a while. An hour or so later I return, and my computer is still counting upwards: 1 million, 1.1 million, more?

In four hours, I return again. Still counting upwards: 2.7 million, 2.8 million, with seemingly no end in sight.

At 4:13 p.m., my computer finally finishes preparing, and actually starts emptying the trash: 3.1 million files! By this time, I’m posting regular updates on Twitter.

Several people tweet back — Phronk: “I’m amazed that: 1) You’ve collected that much garbage; and 2) Your hard drive even holds that many millions of files.” Jmlynch: “if it was a windows machine it probably would have crashed by now ;)” Actually I think Windows computers automatically empty trash and don’t automatically backup, so I wouldn’t be having this problem.

It’s about this point that I realize I could have simply reformatted my backup drive, saving the few extraneous files I needed. I could still do this even now, but now I’m on a mission. Will it really work? Will my computer successfully erase my backups to make room for — more backups?

At 11:16 p.m. I tweet that I have 2.5 million files left to delete. Every once in a while the computer alerts me with a warning that it’s unable to empty the trash because some file like “bootX” is locked. Fortunately there’s a “continue” button and it seems to resume emptying. I go to bed, making sure to set my computer to stay awake all night and continue emptying.

I wake up and go for a run, forgetting momentarily about the momentous event occurring in the office. Finally at 8:55 a.m. I check again. Still emptying, and I tweet that there are now just 727 K files left! Brlittle reminds me that I could have just reformatted the hard drive. Yes I know, and Lewis and Clark could have just sailed around the Cape, but where’s the adventure in that?

I shower and check in again. 250 K files left, but I’ve got errands to run. I’m torn between staying and watching this epic struggle unfold, or just checking in when I return. I decide to go. I can’t let emptying the trash totally consume my life (as if it hasn’t already).

At 9:53 I’m at Panera on my laptop. Msanford tweets “If you’re on a #Mac, you can open a Terminal window and `rm -r ~/.Trash` which will empty any size Trash in about one second.” Holy shit! This is like learning that Lewis and Clark could have just teleported to Oregon!

At noon I return home and check to see if the files have really been erased. I’ve got 350 GB of free space on my backup drive! Success! — And I did it the hard way — it must have taken at least 24 hours! I notice another 10 GB of files I can go ahead and delete. What the heck, this is nothing. They’re gone in 20 short minutes.

The moment of truth comes when I test my backup software to make sure it really works. A window opens with the dreaded dialog: “Preparing…”

This could take a while.

This entry was posted in Technology. Bookmark the permalink.

8 Responses to Emptying the trash: An epic journey

  1. Phronk says:

    I’m still amazed by how long this took. Quite the epic journey. :)

    The need to empty the WHOLE trash has always bugged me with OS X. Sometimes I just want to free up some space on a USB flash drive, but I can’t (easily) do that without emptying everything I’ve deleted off ANY drive recently. Since I’m less careful with backups than you, that’s always risky.

  2. jmlynch says:

    At 9:53 I’m at Panera on my laptop. Msanford tweets “If you’re on a #Mac, you can open a Terminal window and `rm -r ~/.Trash` which will empty any size Trash in about one second.” Holy shit! This is like learning that Lewis and Clark could have just teleported to Oregon!


  3. Freiddie says:

    My patience would’ve never stretched that long… computers are supposed to be “fast”.

    Quote: “I hate emptying the trash. It just seems so … final. What if there’s a file in there that I need?”

    I used to be like that when I was young… I had a special directory to store all the “junk” that I don’t want anymore, but might… just might… need some of them later again. It mainly consisted of broken, unfinished projects and random experiments, and was several hundred gigs. I completely forgot where it is now… probably some where on the old desktops back home.

  4. dave says:

    Phronk, I’m totally there with you. Time machine has freed me from that concern just a bit, but I still hate to empty the trash.

    Incidentally, just to confirm how anal I am about backups, I also use Dropbox to back up my most critical files (e.g. all my writing) online. So not only do I have the physical backup drive, but I have a backup in the cloud that I can use to restore nearly everything that’s important to me. Dropbox has also made zip drives nearly completely obsolete for me. It’s a very handy tool.

    …and an update: the backups are working flawlessly again. The first one took a few hours, but after that it only takes a minute or two to make a backup.

  5. rswc90 says:

    Thanks for the blog! I am sitting at a library trying to avoid the “mental illness” known as Buckeye Fever as the last game of the season is on right now. I thought it would be quiet here — I wanted to learn more about emptying trash on a Mac. The library is filled with foreign students and women with their toddlers — chatty, tired, nap-needing toddlers! Thanks for the chuckle. I, too, must continue the journey of learning “if I empty trash on my hard drive, does time machine empty all the parts that might have occurred in the backups? Or, might I be able to keep the trash from my backups even if I empty it in present day?”

  6. ilkka says:

    I have the same problem. Happened to me twice.

    My question to you is: Do you use Adobe Lightroom to process your photos? I think this has something to do with it’s registry files.

  7. Hex says:

    hilariously said :) thanks for sharing.
    I’m having the same problem- only the TimeMachine backup I’m deleting was over 1TB. it has been deleting since the day before yesterday. Once it had “prepared” to empty the trash, it started deleting, saying “Items to delete: 1,443,808″ ok, fine, it counted down to zero…. aaannd.. then it started counting into negative digits.. right now it’s saying “Items to delete: -3,140,178″ and it is counting UP, not down. WTF?

  8. When I deposit a document into the Mac Trash, it makes me delete it immediately instead of waiting for the trash can to be full and I would prefer to delete several items all at once. It was fine several months ago, but I don’t what I did, if anything, to change. Can anyone help? I have Time Machine, would that be causing the problem?

Comments are closed.