How do you delete a Time Machine created backup directory?
I installed OS 10.5 as an upgrade. After a day, I decided to reinstall with the archive and install option. However, I had already backed up my system with Time Machine. So I have this directory on my second hard disk:
drwxr-xrwx+ 3 root myusername 102 Oct 29 19:31 Backups.backupdb
I noticed the + and removed the ACL with sudo. However, I still cannot remove the folder with: sudo rm -rf Backups.backupdb. I get "operation not permitted" on all attempts. Dragging the folder to the trash yield similar results. *What is the Terminal (bash) way to delete this folder?*
Also, I noticed all sub-directories have an @ symbol, like this:
0 drwxr-xr-x@ 12 root myusername 408 Oct 30 15:59 mycomputer
Brian, I'm only interested in solutions that involve deleting the directory and all sub-directories without formatting the drive. Thanks for the tip though.
The @ is covered in the "man ls" under Leopard. I can't remember what it stands for cause I am on Tiger right now and "man ls" does not mentiion it.
My opinion, which may not be worth much, is that if "rm -fr" doesn't do it. Then there is no way that finder or any of its stuff such as Trash Can will work either.
In my case, I just reformatted. However, you might try booting from the Install Disk (especially a Tiger one) and running the "rm -fr" from there. Tiger might not understand the directory where Leopard will and maybe there is some connection when the installed Leopard is active. Anyway, it is just a thought. Hope that helps.
Since Time Machine backs up your entire systems folder you'll need to hold down the Option key while selecting Empty Trash. There are certain files, bootx, etc. that can only be deleted from Trash using this option. I just deleted my original TM backup folder and this was what it was asking before it would empty the trash entirely.
If you do have problems getting the folder to go to Trash, make sure that you have turned off TM and selected another drive\folder for it's location.
+If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information, the permissions field printed by the -l option is followed by a '+' character.+
Interesting, but that didn't seem to do anything. Even if these cool GUI methods worked, I'd really like to understand the command line method, i.e., the underlying command at the file system level to kill this folder. I guess I just need to find some docs to figure out how to recursively shut off the additional file attributes on this directory tree. This is my first experience with something that the root user cannot delete (i.e., sudo).
Omninerd, when you figure it out, I would be interested in what you found. I, too, have never run into anything that "sudo rm -fr" would not get rid of.
I booted into Tiger and deleted the Backup file by dragging it to trash and emptying the trash, but that did not release the 16gig that was being used by TM. So, I found the files in ".HFS+\ Private\ Directory\ Data^M" and did a "sudo rm -fr /Volumes/laCieDisk500A/.HFS+\ Private\ Directory\ Data^M/". That released the disk space. I just do not know what the further implications/problems that that causes. I am not worried since I can reformat that drive at any time. HTH
rm is not aware of directory hard links. Removing files from within your backup using command line tools may result in more than you bargained for being deleted.
Thanks for the note on fsacictl. Since I never use acl's, I was not aware of it.
I have a dmg that contains a copy of Leopard after I installed it and made some mods of my own. That way, I can play with Leopard and restart back at a known state if I wreck anything. Anyway, I had a TM backup and decided that for now I am not interested in TM since it looks like it may have problems with external drives. So, I found that Disk Utility.app would not allow me to repartition the drive, probably because of the ".HFS+ Private Directory" or something like that which is where the TM backed up data resides. However, I had no problem using Disk Utility.app in erasing the partition and changing the volume name. I had no other data on the drive. So, a full erasure did not bother me.
When I was poking around on the TM drive, I found that the data files were being kept in that ".HFS+..." directory within lots of subdirectories and it looked like only indices were in the Backup.backupd subdirectory. I don't know why it worked for me, but I had no problem doing a "sudo rm -fr Backup.backupd". When I did that I noticed that none of the gigs of disk space were released and that it is when I started poking around and found the data in the ".HFS+..." directory. Which is when I then used Disk Utility.app to erase the drive.