Android: Delete entire database
Asked Answered
R

6

6

I would like to delete a complete database created by my application.

Do you know any adb command, or android sentence to do it?

Reeve answered 29/1, 2010 at 10:24 Comment(0)
E
7

I think you need to start up your emulator with the command: -wipe-data

Enthrone answered 29/1, 2010 at 10:29 Comment(1)
FYI, -wipedata will actually delete the entire user data image - developer.android.com/intl/fr/guide/developing/tools/…Rhapsodist
R
12

You can run the command:

adb -s emulator-5554 shell (or whatever port you use)
cd /data/data/<packagename>/databases/

By typing ls, you will see the databases created and you can remove the one you want with rm

rm myapp.db

See more here

Retroact answered 29/1, 2010 at 11:5 Comment(0)
E
7

I think you need to start up your emulator with the command: -wipe-data

Enthrone answered 29/1, 2010 at 10:29 Comment(1)
FYI, -wipedata will actually delete the entire user data image - developer.android.com/intl/fr/guide/developing/tools/…Rhapsodist
V
6

Also, in Eclipse you can go to "Window -> Show View -> Other... -> Android -> File Explorer"

Then navigate to "data/data//databases"

Select the database file, then click the red minus sign to "delete the selection"

Vortex answered 22/3, 2011 at 3:33 Comment(0)
T
2

go to DDMS->FleExplorer-data/data/packagename/databases/name_of_database

click on the name_of_database and press the red minus!

If you don't have the FileExplorer go to Window->ShowView->FileExplorer

Telestich answered 19/4, 2011 at 18:22 Comment(0)
P
1

Perhaps this is too obvious but uninstalling the application via Manage Applications will remove the db, assuming it's in the application's files dir.

Ponceau answered 29/1, 2010 at 20:30 Comment(0)
G
1

The clear data button will actually delete the database without uninstalling the entire app.

Gorgon answered 16/1, 2011 at 19:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.