How to delete information from the Toaster database
By default, Toaster stores all build data in a
toaster.sqlite database file located in the Build Directory.
You can delete builds from the Toaster database using two bespoke commands (
builddelete) added to
Follow these steps to delete a build
1. Identify the build: Run the following command from your Build Directory to display a user-readable, tabbed list of build IDs and identification information:
$ python ../bitbake/lib/toaster/manage.py buildslist
2. Delete a specific build: Using the build ID displayed in the previous step, run the following command to delete a specific build:
$ python ../bitbake/lib/toaster/manage.py builddelete <build_id>
The build and all related information is deleted from the Toaster database. The deletion operation traverses the ForeignKey relationships recursively.
When using the
builddelete commands, you need to consider the following:
- For default configurations, your working directory must be the Build Directory. Using these command from the Build Directory allows Toaster to find the
toaster.sqlitefile, which is located in the Build Directory.
- For other database configurations, it is possible that you can use these commands from a directory other than the Build directory. To do so, the
toastermain/settings.pyfile must be configured to point to the correct database backend.
It is recommended to always call
manage.py from the Build Directory.