2

On my local harddrive on my MBP retina (2014, 10.11.3) there is a Backupdb.backupsdb folder:

drwxr-xr-x+ 5 root wheel 170B 2 Jan 03:32 Backups.backupdb/

I thought that folder only exists on timemachines? However, i want to remove it, as it only holds an old unfinished backup:

drwxr-xr-x@ 5 root wheel 170B 20 Mär 14:06 2016-01-02-020746.inProgress/

I disabled SIP, but neither rm -rf nor sudo rm -rf worked, not even in recovery mode. I always got Operation not permitted.

Does anyone know how to delete it?

2
  • Have you tried removing the folder for the incomplete backup using a method like you tried for the parent directory?
    – samh
    Commented Mar 20, 2016 at 15:26
  • 1
    It's possible a file is locked - Can you try the command ls -leO@
    – Hefewe1zen
    Commented Mar 20, 2016 at 15:40

2 Answers 2

1

The short answer is remove ACL from the folder. SIP prevents system files from being deleted as root (so enable that again) whereas ACL are used to prevent root from modifying user files and perhaps backup copies of system files.

Here's how to list the permissions on a specific folder using ls -l which shows long format results:

  • ls -lO shows restricted for SIP and the O is capital letter "o" - it's unlikely you will see restricted or other flags on Backups.backupdb
  • ls -le shows the Access Control List (ACL) - it's highly likely you have something like 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown causing the sudo rm to fail on you. Use the number (0 in this case) to then remove that ACL restriction.

You can combine both as ls -lOe and get both the ACL and SIP restricted status. As you can read in this post on how malware could potentially unlock Time Machine backups - you can do the same as root/sudo from an admin account:

chmod -a# 0 /Backups.backupdb

Also, you might need to recursively remove the ACL since a directory needs to be made changeable and then you can change the files within. Also, ACL can be inherited, so depending on what your exact permissions are on your folder and the files it contains - you might need to change things slightly from the syntax above.

3
  • Thanks for your answer. I played around a bit, and it seems I deleted every file (find -type f does not show up results) however I still cannot remove the folder because there are symlinks in there, that I cannot delete (why ever). I ran the command find . -type d -exec chmod -R -a# 0 . {} \; with type d,f and l. After that I could remove the files with find . -type d -exec rm -rf {} \; but sym links are still there, that I cannot remove (example: Library/Frameworks/IOKit.framework/IOKit) although ls -l0e shows nothing on them. Do you know why?
    – Simon
    Commented Mar 23, 2016 at 17:06
  • I just saw they're all inside of *.framework files. I can drag them to Trash manually, but neither move nor delete them via Terminal. I get "Operation not permitted" and "Directory not empty" errors.
    – Simon
    Commented Mar 23, 2016 at 17:12
  • LOL, nvm, I just dragged the whole folder to trash and emptied it. That worked. I don't get why it didn't work with Terminal, anyway.
    – Simon
    Commented Mar 23, 2016 at 17:13
3

What you are asking is to disable local backups, right? To do that, type this in terminal:

sudo tmutil disablelocal

The local backups will go away, and so will the space taken up by them (The folder, backups.backupdb)

1
  • Unfortunately the folder still exists.
    – Simon
    Commented Mar 23, 2016 at 17:00

You must log in to answer this question.

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