ICOD – 6.2.10 – Delete all SMS messages on iPhone

UPDATE: 4/21/2011 – The SMS db on my iPhone moved to /private/var/mobile/Library/SMS/sms.db on my iPhone 4, IOS 4.2.1

iPhone Command of the Day, 6/2/2010

UPDATE : 10/31/2010 – The app “Delete all SMS” has been fixed, I have been using it for almost a month with no problems, and it is much quicker than this method. I leave this up in case anyone wants to know how to do it the long way, instead of simply installing the app “Delete all SMS” from Cydia, or perhaps wants to hack around with their SMS database.

Howto delete all SMS messages on your jailbroken iPhone.

I frequently get hundreds to thousands of text messages that all say the same thing from my monitoring systems as part of my job. It’s *very* tedious to delete these one at a time, and paying my kids $1 per 100 to delete them is getting too expensive.

Yes, this must be a jailbroken iPhone. If you’re not jailbroken, upgrade to 3.1.3 and jailbreak using these instructions:

1. Sync your iPhone, let iTunes take a backup2. Upgrade your iPhone to 3.1.3 through iTunes
3. Once iPhone is 3.1.3 download and run Spirit Jailbreak (http://www.spiritjb.com/)
4. With iPhone connected, run Spirit and click Jailbreak
5. Wait for phone to reboot and you're done.
6. Go to Cydia, install Rock App

There is an app in Rock and Cydia that will delete all SMS but it SUCKS and routinely jacks up all your future SMS messages at random by inserting text and pictures into them. Fortunately, it seems the actual pictures and messages are not sent to the other party, but it does look on your iPhone like they were sent.

So I highly recommend NOT installing or using “Clear all SMS”.

Instead install “Terminal” from Rock or Cydia.

1. Launch Terminal
2. Case sensitive, type the below line and hit enter
rm ./Library/SMS/sms.db
3. It should just kick you to the next line, now reboot your iPhone

6 thoughts on “ICOD – 6.2.10 – Delete all SMS messages on iPhone

  1. Rob

    Thank you for the information. I just wish I had an iphone to jailbreak. Any news on Verizon getting the iPhone?

  2. Matt

    This is no longer accurate. A version for IOS 3.x and 4.x has been released, which fixed the issue you discussed. The problem was the db schema from 2.x to 3.x changed. See http://www.utternerd.org for it, it should be updated in Cydia today. A simple 1 touch method is a bit simpler than using a shell, and manually removing the SMS db.

  3. Jon Zobrist Post author

    Thanks Matt! Indeed this is no longer the case, I have been running the updated version since your comment and have not had any issues. It works great, exactly as desired, I will update this post indicating the app works now and is much faster than the work around.
    Thanks again,
    Jon

  4. Vincent

    Hi Jon,I’d be really grateful if you could answer a question for me. Does the Cydia App permanently erase all messages from the SMS.db so they can never be retrieved or does it simply clear them from the phones UI? I’ve searched for info on the app but there’s very little out there. As I said your help would be appreciated. Vincent

  5. Jon Zobrist Post author

    I believe it permanently erases the messages from the SMS.db, which moved to /private/var/mobile/Library/SMS/sms.db

    I had about 20 SMS, checked file size with ls -hl
    ls -hl /private/var/mobile/Library/SMS/sms.db
    -rw-r–r– 1 mobile mobile 64K Apr 21 11:05 /private/var/mobile/Library/SMS/sms.db

    Then ran Clear all SMS and it shrunk to 48K
    ls -hl /private/var/mobile/Library/SMS/sms.db
    -rw-r–r– 1 mobile mobile 48K Apr 21 11:40 /private/var/mobile/Library/SMS/sms.db

    Hope that helps!
    -Jon

  6. Vincent

    Jon, you’re a legend! I’ll be honest most of your response is way over my head but I get the general idea. It was the answer I was hoping for. Thanks a million for the speedy reply. Take care.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>