Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Delete a Group

Any group owner or Thorium admin can delete a group. It is important to remember that groups are the resource owners rather than the users that created those resources. Files, repositories, images, pipelines, tool results, and file comments can all be owned by groups. If you delete a group, some of these resources will automatically be purged by the API. For performance reasons, some resources will not be cleaned up when the API services a group deletion request. The following table indicates which resources are cleaned up automatically:

Group ResourcesRemoved Upon Group Deletion
FilesNo
File CommentsNo
ImagesYes
PipelinesYes
Tool ResultsNo
ReactionsYes
Reaction Stage LogsNo, aged out automatically
RepositoriesNo

Archiving Groups Instead


Generally we recommend archiving rather than deleting groups. You can do this by adding the Thorium system user to the group as an owner (since groups must have atleast 1 owner) and then removing non-admin group members. This preserves data and analysis artifacts without orphaning data and and mitigates the risk of future data leakage if that group name was reused by another team.

Preparing For Group Deletion


If you do want to delete a group, you will need to manually delete any files, repositories, tool results, and file comments using the Web UI, Thorctl, or direct API requests. The following support table details what interfaces support deleting resources:

Group ResourcesThorctl DeletionWeb UI DeletionAPI Deletion Route
FilesYesYesYes
File CommentsNoNoNo, support planned
ImagesNoYesYes
PipelinesNoYesYes
Tool ResultsNoNoYes
ReactionsYesYesYes
Reaction Stage LogsNoYes, delete reactionYes
RepositoriesNoNoYes

Manually Deleting Files


When you request to delete a file, you are deleting a file submission from a database. A file can have many different submissions from one or more groups. Therefore, a file will only be deleted from the backend object store when the last submission for a file is deleted. This means that a file can be safely "deleted" from one group without removing that file from other groups.

File submissions can be deleted in Thorctl, the Web UI, or through direct API requests. When using Thorctl to delete files in bulk it is important to specify a group to limit the deletion operation to using the -g flag. You must also use the --force flag when not limiting the deletion to a specific target sha256/tag, because this is considered an especially dangerous operation.

DANGER: always specify a group using the -g flag, otherwise you may delete files indiscriminately.

$ thorctl files delete -g demo-group1234 --force
SHA256                                                           | SUBMISSION                          
-----------------------------------------------------------------+--------------------------------------
3d95783f81e84591dfe8a412c8cec2f5cfcbcbc45ede845bd72b32469e16a34b | 49e8a48b-8ba6-427c-96a9-02a4a9e5ff78 |
...