4

Does anyone know how to delete Time Machine in Mac OS X 10.6.4?

Before answering:

  1. sudo rm -rf /whateverthetimemachineis does not work
  2. Disabling the ACL permissions first with sudo fsaclctl -p /whatever -d does not work, sudo: fsaclctl: command not found
  3. Use the delete all backup feature in Time Machine... this is slow as hell, would take days. Need a command line solution.
  4. No I don't want to reformat the drive, I have other content on it, and no don't say I should have separated on two partition or two drives, I did it this say since partitions cannot be dynamically changed, and two drives is annoying since, whats the point of having a big drive?... plus has no relation to the issue at hand.
  5. Already googlied for hours and read everything on Super User, nothing working. and all solutions are the first 4.

Any clues?

10 Answers 10

3

Try this:

sudo tmutil delete /Volumes/yourTimeMachineVolume/yourTimeMachineFolder
3

I believe this is caused by the weird way of using hard links for directories, which is not supported by general UNIX or Linux commands.

I used Morula's solution above and this worked perfectly in Mac OS X 10.8.1.(The Time Machine backup was created in Mac OS X 10.7, however.)

The Man page for the command line utility used, namely tmutil, is located at here.

1

I presume by "delete time machine" you mean deleting your Time Machine backups.

Where are the Time Machine backups stored? An external hard disk or a network share?

What error messages do you get when you try rm -rf?

Try simply moving the Time Machine backups folder to the trash - sometimes that will ask for the necessary permissions, as well as giving more meaningful errors.

Is the drive the Time Machine backups are stored on set to ignore ownership and permissions?

Is Time Machine switched off while you're doing this?

Try verifying and/or repairing the disk your Time Machine backups are located on using Disk Utility in /Applications/Utilities.

5
  • 1
    rm -rf shows operation not allowed. moving into trash doesn't work, no permission, nothing is deleted. time machine is off. repairing disk doesn't work... remember, the issue is that I don't have permission, repairiing would only restore permission back to something i can't delete.
    – cappuccino
    Sep 24, 2010 at 12:37
  • What do you mean by "repairing disk doesn't work"? Did it fail? If so, your hard drive may be dying. Repairing the disk shouldn't change any preferences (and if you don't believe me, just verify it - that won't change anything). Is the disk set to ignore ownership and permissions?
    – Scott
    Sep 24, 2010 at 13:31
  • no repairing permissions completed, but it made no difference. rm -rf, sudo rm -rf with a root user, clearing the ACL permissions with sudo chmod -R -E and then running sudo rm -rf does not work either. it just says "Operation not permitted". the drive is not dying, its related to permissions, which is really annoying, since root user should be able to do anything.
    – cappuccino
    Sep 24, 2010 at 16:42
  • I don't mean repair permissions (the buttons on the left), I mean repair disk (the buttons on the right). Personally, I suspect this is not a permissions issue - as you say, root should be able to override any permissions. In my experience any problem that results in root being denied "permission" is due to an underlying problem, such as a drive being mounted read only (as an example - I'm not suggesting that's your problem).
    – Scott
    Sep 24, 2010 at 17:08
  • If you are logged in as root and it gives you operation not allowed, then there’s some other error. Could be physical or logical in the drive/volume that holds the TimeMachine backup. As an alternative, boot from the install DVD, start DISK utility and try performing verify/repair on the volume that has time machine. See if it fixes something. Sep 24, 2010 at 23:51
1

If your sudo rm -rf /YourTimeMachine/Backups.backupdb/ComputerName doesn’t work, what is the error shown?

You can always enable root, boot in single user and remove the files from there. A Time Machine backup consists of your files and a lot of symlinks. Remember to turn Time Machine off while doing all this. Also check some of the advice given in Scott’s answer.

As a side note, I suggest you try Apple’s Dedicated StackExchange site next time.

2
  • operation not allowed. already have root enabled, ehcen why I sudo into commands. does not work.
    – cappuccino
    Sep 24, 2010 at 12:38
  • But did you log AS root. In that case sudo won’t be necessary. That’s the idea of enabling root in the first place. Sudo doesn’t transform you into root, it elevates your privileges. Enable root, logoff, login as root (it should appear in the Login Screen) and try the rm -rf command without sudo. Beware, under root you can make nasty mistakes and bring your whole OS down to its knees. Sep 24, 2010 at 23:48
1

I suspect that maybe a system immutable or user immutable flag has been set on the backup. That can interfere even when using root. I can't try to nuke a backup just to find out, unfortunately.

Check out the man page for chflags

1

The easiest way to do this is add any drive that Time Machine backs up to the exclusion list in System Preferences -> Time Machine -> Options. Then, on the next backup, anything in the exclusion list would not be backed up and any existing backups of excluded folders would be deleted. Since this includes everything, then everything would be deleted.

The main reason that rm does not work is because it doesn't recognize hard links on folders, which Time Machine uses extensively for its backups.

1

First, I turned off Time Machine. Then I moved the backupsDb folder (whatever it's called) to the trash. When I tried to empty the trash normally, it did not work. But when I held down the option key and clicked the empty trash button, it worked. I guess when you hold down the Option key and select "Empty trash," you can delete all items in the trash, including locked items.

0

If nothing else works...

Download a Linux Live CD, burn it to a CD ROM, boot from it.

From there, rm -rf should work. (It worked for me when I couldn't format a disk on Mac OS X because it said "Device busy" even with root privileges.)

0

One thing you could try is to partition the drive temporarily using Disk Utility, as long as you can copy the desired content onto the new partition, you should then be able to delete/ reformat the Time Machine partition.

Partitions don't stop you using all your drives space, and I use iPartiton which allows hot repartitioning.

0

I believe I have discovered an important detail (and a bug) that is relevant to using the Time Machine GUI to do this. Although several of the above solutions may well work, you might find it easier to proceed this way:

First, and this is important, open a Finder window (you can get there later, but it's more convenient to do it this way) and navigate to a point where the drive whose backup you want to delete is showing in the MAIN FINDER WINDOW -- not the sidebar. This usually involves clicking on your computer's name in the side bar, if it is displayed, or alternatively clicking on a drive and then using Cmd-UpArrow to go to the next higher level.

Choose "Enter Time Machine" from the Finder Menu Bar, and RightClick (Ctrl-Click) on the drive whose backups you would remove . . . if you've excluded the drive from current backups, you'll need to navigate "back in time" to a point where it shows up . . . then select the option to "Remove All Backups" and confirm in the subsequent dialog -- you will probably need to authenticate with your Admin credentials.

The bug: If you RightClick on the drive whose backups you wish to remove in the Side Bar, "Remove All Backups" is offered as a choice (not grayed out), but it does nothing when you click it.

Hope this helps -- I just got back 600 Gbytes on may Backup drive that had been taken up by the inadvertent backup of a "scratch" volume.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .