Taking out the Trash
If you’re like me, you probably don’t think a lot about what you throw into the trash on your computer – you just put files and folders in there to be deleted and, eventually, you empty the trash. The other day I dropped a 40GB virtual machine into the trash and then told OS X to empty the trash. A few hours later, it was still chugging away at pretending it was deleting the trash. There were no messages in Console about files being locked and unable to be cleaned up and no warnings of any other kind. Being the resourceful individual that I am, I dropped into the terminal and ransudo rm -rf .Trash/*
. That process hung as well. I checked the console and all of the various logs again and there was nothing going on. As a last resort before giving up and switching to the backup computer, I rebooted the Mac into single user mode (hold down Command-S during the boot sequence). Once I was in single user mode, OS X dropped me off at a command prompt as the root user. A few quick cd
s later and I was able to once again rm -rf .Trash/*
. This time it worked like a charm. I have no idea what happened and there were no logs to point me in the right direction. I can only assume that OS X got hung up trying to read the contents of the virtual hard disk which is, in reality, nothing more than a bundle of files, much like an OS X application. Maybe there was just too much junk…