How To Delete The Undeletable Time Machine Backups.backupdb File On A Mac

This post is for all the desperate people with time machine backups in the trash that they can’t delete. Enter stage left, my 3 day saga of frustration and reading everything I could find online on how to do this, to no avail. Help is here…this story has a good ending.

It began with an external drive I had purchased to store time machine backups of my Mac. Over time, I began to put other files on the same drive because it was convenient and I could store old photos there that were accessed infrequently and taking up room on my computer’s hard drive. Fast forward a few years to when the drive started to fill up, and at the same time, I discovered a cloud backup service I could use instead of an external drive (read here for my review of Backblaze 🙌🏻.) I no longer needed my Time Machine backups, innocently resting as a Backups.backupdb folder on my external drive. I dragged said innocent file into the trash and after a million years of transferring, it had met it’s final resting place. Or so I thought.

I click “empty trash” and see the trash emptying progress counting thousands of backup folders among many more. Hours later, nothing has been deleted. The trash is still full. The Backups.backupdb folder is still glaring at me. I unplug the external drive and the trash appears empty. I plug it back in, and there are the Backup folders. I try manually deleting the folder, no luck. I turn to google and find no answers and a lot of pained souls.

Finally, at the advisement of osXdaily, I thought I had found the answer. I carefully open Terminal and type in
“Cd /Volumes/MAIN/.Trashes/*”

MAIN is the username of the administrator account on my computer. I want to identify the trash folder on this account, where the Backups.backupdb folder shows up only when my external drive is connected. Between the username folder and the .Trashes folder should be a hidden numbered folder which contains your trash folder. There are hundreds and hundreds of hidden folders on computers that house the folders we known and love.

Nothing happens when I hit enter, so I type in
“Sudo rm -rf /Volumes/MAIN/.Trashes/*

AskUbuntu.com states “The -r argument stands for "recursive." It will remove what you ask, as well as all files and directories underneath it. The -f argument stands for "force." It will ignore nonexistent files and never prompt.”

Vignesh K Viki of Software egg. states “The “rm” tells the computer to remove; the r deletes everything within a given directory; and the f stands for “force”, telling the computer to ignore the usual warnings that come when deleting files.”

“Sudo” essentially tells the computer I can do what I want.

Wikipedia describes the sudo command as the following: “is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser. It originally stood for "superuser do" as the older versions of sudo were designed to run commands only as the superuser.”

I have basic knowledge in coding and feel comfortable working in Terminal. I’m going to delete anything and everything in the trash folder on my user account MAIN, which is where the offending backups.backupdb file rests. This is war. Note: rm - rf is a command you never ever ever want to enter into Terminal without a designated file following. It will delete everything in that file, and everything beneath it as well. If you don’t designate a specific file, it will delete everything on your entire computer.

I hit enter, and the files are still there. STILL THERE! An obsession has launched. I go to sleep that night thinking about why I can’t delete these files. I’m frustrated and a challenge has been initiated. I plan how the next day will not be spent doing all the fun things but achieving victory against one little folder…taking up many gbs of space on my external hard drive. This was the last step after I had painstakingly combed through, purged, and organized 1000’s of files on this drive to free up space. A folder in the trash stood between me and success. This sounds dramatic…..it was.

In my next attack, I decide to get the path name of the trash folder by dragging the backups.backupdb folder from the trash and into terminal. Up pops the file path as
“/Volumes/My\ Passport\ for\ Mac/.Trashes/501/Backups.backupdb/*”

There’s our hidden numbered folder: 501. Now I know exactly where the backups.backupdb folder exists, and the user account where I had placed MAIN in the past is actually a weird way of writing my multiword name for my external drive: My Passport for Mac.

Onward.

I take the pathway for my folder, and I enter “sudo rm -rf ” prior to it to delete everything in that folder. This line of code will override any protections of the folder and obliterate it. I enter
“Sudo rm -rf /Volumes/My\ Passport\ for\ Mac/.Trashes/501/Backups.backupdb/“

Upon hitting enter, Terminal politely writes back: “Password:”. I type in the password for the external drive and hit enter…

And nothing happens. I check the trash, the folder is still there. I look inside the folder…still there. About 5 minutes go by and I’m running through google again, when I get the idea to control + click the external drive and see what the capacity looks like, and the available space is going up and up. Terminal is quietly and beautifully deleting my undeletable backups. I get impatient when there are 2 folders left and they allow me to control + click -> “delete immediately” from within the trash and disappear.

And so it ended. Mission accomplished.

Here are your quick and easy instructions.

* Do not attempt if you do not feel comfortable doing so, and understand that the sudo rm -rf command will delete everything in the file path you place beyond it. NEVER EVER type sudo rm -rf with nothing after it or you will delete your entire computer and you will probably die. Seriously. I am not responsible for any mistakes or data loss here…attempt at your own risk. By proceeding, you agree to the above.*

1. Find Terminal by going to Applications -> Utilities -> Terminal, or by typing it in the Spotlight in the upper right hand corner or searching for it in Finder. Open Terminal.

Option 1: Searching for Terminal in Spotlight. Click the magnifying glass first, and type in terminal. This box will pop up. Select the Top Hit shown here.

Option 1: Searching for Terminal in Spotlight. Click the magnifying glass first, and type in terminal. This box will pop up. Select the Top Hit shown here.

Option 2: Searching for Terminal in Finder. Go to Finder and type Terminal in the Search box.

Option 2: Searching for Terminal in Finder. Go to Finder and type Terminal in the Search box.

When Terminal is open, it will look like this box with different wording inside.

When Terminal is open, it will look like this box with different wording inside.

2. Drag your backups.backupdb folder from the trash into Terminal, near the text.

3. A file path will have popped up in Terminal, looking something like
“/Volumes/My\ Passport\ for\ Mac/.Trashes/501/Backups.backupdb/*”
(‘My Passport for Mac’ is the name of my external drive, and the name of your user account or your external drive should be in place of ‘My\ Passport\ for\ Mac’.) Highlight and copy the file path.

4. Open Text Edit and type in
“Sudo rm -rf “ Include the space.

5. Paste your file path from Terminal into Text Edit after “sudo rm -rf “, so it looks something like this:
“sudo rm -rf /Volumes/My\ Passport\ for\ Mac/.Trashes/501/Backups.backupdb” Highlight and copy the ENTIRE LINE.

6. Paste the entire line into Terminal and hit enter. If it asks for a password, type the password for your external drive or user account and hit enter.

sudorm.jpg

7. Control + click your external drive or HD, select Get Info, and watch as Terminal deletes the Backups.backupdb folder and files inside, and the available space on your drive or HD goes up.

Et voila! In no time, your Time Machine Backups.backupdb folder and contents will be gone, the trash will finally be empty, and you can go forth in the world.

gbsondrivebeforeafter.png

Happy Trash now empty :)

Trash Now Empty 2.png

If this helped you, please leave a comment below! I would love to hear from you!