Deleting a SQLCipher db


#1

In the Android doc there is the SqliteDatabase class w/ a method that allows one to delete a db. The method is deleteDatabase(FILE file). This method doesn’t appear to exist in SQLCipher - perhaps I’m wrong about that though. Still, I’d like to know: how does one delete a SQLCipher db programmatically?

Doug


#2

Hi @Doug,

A SQLCipher database is a file on the filesystem, so you can delete it using the reference to the File instance you receive in Android:

databasePath.delete();```

#3

Thanks Nick, I appreciate the help.