title: Sqlite File Size not decreasing after deleting some rows from database in iOS
body: <p>I am programatically trying to check the size of <code>SQLite</code> database stored on the iphone after deleting some rows. The records get deleted, but the file size remains the same. Is there any way I can get the correct size of file after deleting records from sqlite in iOS? Please see the code below:</p>
  
  <pre><code>NSString* databasePath = [[NSString alloc]
                                initWithString: [self.documentsDirectory stringByAppendingPathComponent: self.databaseFilename]];
  unsigned long long fileSize = [[[NSFileManager defaultManager]
                                      attributesOfItemAtPath:databasePath error:nil] fileSize];
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>I cant use the vaccum approach because it deletes all the records . I am deleting 50% of data only, and not all. So this is not duplicate of this question
  <a href="https://stackoverflow.com/questions/2143800/change-sqlite-file-size-after-delete-from-table">change sqlite file size after &quot;DELETE FROM table&quot;</a></p>