How to delete information from the Toaster database

From Yocto Project
Jump to navigationJump to search

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 (buildslist and builddelete) added to /poky/bitbake/lib/toaster/

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/ 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/ 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 buildslist and 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.sqlite file, 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/ file must be configured to point to the correct database backend.

It is recommended to always call from the Build Directory.