explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

Easy Way to Delete a Sparsebundle from Time Machine

29 Comments

I have had a Time Capsule in service for over 4 years.  It has been used to backup my old personal mac, my current personal mac, 2 work macs and my mom’s mac.  I’ve since updated from Snow Leopard all the way up to Mavericks, my old personal mac died (pre-solid alum body MBP 2008 era had known integrated video card issues, this one went through 2 of them), I’m no longer working for either of those companies and haven’t access to the computers and somehow my mom’s backups have been corrupted.  So…. I need to kill 4 of the 5 sparsebundle files.

This solution is going to be super quick.  You need to be comfortable with using the command line and have some patience.  When you’re deleting several dozen GBs of data, things can be slow to start.  Ok here are the steps:

  1. understand that what you’re doing is not orthodox and that it’s irreversible.  If you’re not comfortable with that idea, I’d not do this.
  2. grab a ethernet cable
  3. connect your computer to the Time Capsule (TC) with said cable
  4. make sure you can see your TC from within a Finder view in the sidebar
  5. open Terminal (either navigate to Applications -> Utilities -> Terminal or hit ⌘ + space to open Spotlight and type “terminal” and select Terminal from the list)
  6. in terminal type:
    cd /path/to/sparsebundle

    in most cases it will be located here:

    /Volumes/Data/Your.sparsebundle

    If not you can type “cd” then from within the Finder, drag the sparsebundle into the terminal where it will fetch the path for you.

  7. now the next step is where a little bit of patience is needed.  Nothing sucks more than dealing with something you’ve been banging your head against for ages only to think you have a solution and it doesn’t even provide feedback.  in terminal type:
    find ./bands -print -delete

    in some cases you may need to type:

    sudo find ./bands -print -delete

    which will prompt you for your password

  8. this is basically getting  a list of everything in the sparsebundle’s bands folder, prints it out in the terminal (which is your feedback to know SOMETHING is happening) and then it deletes them one by one.  Keep in mind when you first do this, there may be an initial delay before you see any feedback.  That is normal when working with large data sets.
  9. you can now safely delete the sparsebundle without affecting another sparsebundle by typing:
    cd ..

    which backs us out of the current directory and then

    rm -rf ./Your.sparsebundle

This should really go without saying, but I’m not responsible for any harm that comes to your computer, data, sanity, whatever from following these steps.

29 thoughts on “Easy Way to Delete a Sparsebundle from Time Machine

  1. After trying several different approaches, this worked for me. Thank you!

  2. GREAT! As bitter as it is that old Mac OS does NOT do this elementary thing for you in a simple and convenient way – your solution is elegant and fast. I particularely like the insight about feedback. I’ve had this problem for a long time now, I was really frustrated. Thanks so much.

  3. It works!!
    For 780GB it took 5 hours on aTC of 1TB.
    Thanks for your useful post.

  4. Thank you for these clear instructions. I am happily sitting waiting for the bands to finish deleting. This method is so much nicer than the last time I bumbled through doing this… 😀

  5. Should the bands begin displaying immediately? I have entered the command but Terminal is just sitting there, proving zero feedback. If I try to shut the Terminal app, I get a warning that a process is running.

    • Sometimes it takes it a while to start providing feedback. Not in the scenario, but in others where I may be processing a huge (100+ MB) file, if I make it output to the console, it can take longer because I think it buffers the output and then starts spitting it out. So it’s normal for it to take time to ‘come to life’…. sorry for the late reply.

  6. Here’s to you on (almost) the anniversary date of this post: Thank you sooooo much for this post!! Apple decided to get into the brain twisting business with this nonsense. Anyone that has a few computers at home/small office is bound to need to get rid of one sparsehell file to replace it with a new machine’s! Is the fruit company’s thought that you’d just keep buying time capsules any lining them up as trophies to your apple devotion? Argh! Argh!
    Lotsa super karma come your way!

  7. Getting error: find: -delete ./bands: relative path potentially not safe

    • You could try doing it from your root level. cd / then you can try find /Volumes/Data/Your.sparsebundle/bands -print. Try doing it without the -delete option first just to ensure you are not getting that error. Then you can add the -delete option back. Good luck.

  8. I gave up on any Mac based method and killed my 1.1 TB backup from Windows. This took some time (~30 minutes) but worked and reported progress. See here: http://gravitationalpull.net/wp/?p=2087

  9. Thank you, thank you, thank you! I have spent hours researching how to delete a single sparsebundle. I also tried a few things with no luck. That is, until I found your instructions. I appreciate you taking the time to document and publicize it. I did not want to have to erase my whole Time Capsule!

  10. You, Sir, are a true hero. Thank you.

  11. After pain and torture, this solution is the one that worked for me. It takes time, you have to have patience, overnight in my case, but I finally prevailed. Thanks a million.

  12. This did it for me also, two 1TB mac book pro backups needed removal – very happy with this excellent advice!

  13. You are the only nerd on earth who has a solution that works, hero! I have a corrupted 2.5TB sparsebundle on a network share.. what a nighmare. Your method has been running for close to 24 hours now, but I see the progress thanks to the -print. awsesome. Put this in a shell script and sell it!

  14. Two proposals for improvements:

    1. mention it can take some minutes before first output

    2. add an optional step before “find”:
    find ./bands/ | wc -l
    This counts the number of items to be deleted, in order to guess how long the deletion may take. This also can take some minutes.

  15. Thanks for this solution. All seemed to be going well but then this error message came up:
    find: -delete: ./bands: relative path potentially not safe
    I tried quitting terminal but no luck. Same error. I’ll try restarting the computer next.
    I’m on a macbook air, so no ethernet. Connecting to a time capsule wirelessly. Maybe that has something to do with the problem?
    Thanks for any help.

    • Sorry for the delayed response. I don’t post very often on here anymore so I rarely check to see if comments were made. I’m hoping you got past this eventually however I’ll answer anyway in hope that others who encounter your problem might gain some insight.

      I’m guessing you have multiple problems mentioned from this and subsequent comments below. Firstly, doing this wirelessly will be problematic simply because it’s slower. That introduces potential connection timeout issues. I’m not a network person so I can’t really speak on how to solve that. I can only say that yes, connection timeouts are a likely candidate for some of your issues.

      Regarding the “relative path potentially not safe”, I have not encountered that issue in this particular use case. the “./” in your path simply means “relative to my current directory”. You could try doing something like find /Volumes/Data/Your.sparsebundle/bands -print -delete and see if it likes that better. Again, I’m guessing here.

  16. I have two time machine sparsebundles I’m trying to delete. Both are giving me this error after some time.
    ./bands/ffa
    ./bands/ffb
    ./bands/ffc
    ./bands/ffd
    ./bands/ffe
    ./bands/fff
    ./bands
    find: -delete: ./bands: relative path potentially not safe
    Scot-Nicols-Air:iMac.sparsebundle scotnicol$

    Connection wireless to a timecapsule since there’s no ethernet on the air.

  17. I am getting the following error on a macbook air connected to a time capsule wirelessly. Got the same error on an macbook pro via ethernet connection.

    Scot-Nicols-Air:Scot’s iMac.sparsebundle scotnicol$ sudo find ./bands -print -delete
    Password:
    ./bands
    find: -delete: ./bands: relative path potentially not safe
    Scot-Nicols-Air:Scot’s iMac.sparsebundle scotnicol$

    Any advice for me? It deleted a bunch of bands then stopped with the error message above.

  18. Works great with macOS Sierra 10.12.2 and a 4th generation Time Capsule 2 TB (the flat one).

  19. Thank you sooooooo much! I have tried so many things, didn’t want to delete the other sparsebundles, but I needed space on mine. It took a long time, but it worked, and now I can finally get a full backup of my Mac to work again. Thank you for taking the time to publish this!

  20. Thank you thank you thank you !!! Have tried 10 other things without success.

Leave a comment