Data Removal
This section describes how to remove data from CommCare, including in cases where you have practice data or need to undergo data cleaning.
Archive Forms
When a form is archived, it no longer appears in reports. The archived forms will also be removed from all exports, with the exception of Daily Saved Exports. Archiving forms that create cases will also undo all case creation.
More details can be found on Archive Forms .
Manage Forms
The easiest way to remove lots of data is to use the Manage Forms feature, which allows you to archive lots of forms at one time. This is available to projects with a Pro or higher software plan. You can use it to archive all of your project's data.
You can also use the Manage Forms tool to locate a specific subset of users and archive their form submissions.
Archive Single Forms
To remove specific data, you can locate individual forms using the Submit History report and archive them as described on Archive Forms . This is available to all users; however it may be difficult to use with a large volume of forms.
Delete Forms
To delete a form in CommCare, you'll first need to archive it. Once a form is deleted, all associated data will be lost forever.
Please ensure you really want to delete the form. Once deleted, it's permanent and can't be recovered.
Find more information on the form deletion feature here.
Deleting Users
Deleting users cannot be reversed
Note that deleting a user triggers permanent deletion of all data associated with that user and cannot be undone. Please read the Notes & Warnings below, as well as the "Other Suggestions" section below before attempting to delete a user.
Data from deleted users is not available in any exports or reports. If you created test users and want to delete them and all data they ever submitted, this may be the easiest approach.
If you delete a user, please note the following behavior:
Forms: All forms that were submitted by that user or associated with the deleted cases are processed for permanent deletion, provided those forms aren't linked to any other active cases. If there are cases that are not deleted that reference a deleted form, there will be problems in that case's Case Detail view on HQ. You will still see a reference to deleted forms in the Case History, but you will not be able to view them.
Cases: All cases that are assigned to that user are processed for permanent deletion. If that case was modified by forms that are not deleted, you will not be able to click through to the Case from the "Case Changes" tab.
Note: If a case is reassigned to a user that is later deleted, all the forms associated with this case will also be deleted even if it’s not originally submitted by the deleted user. An exception to this rule is if you are using case sharing. When you use case sharing, shared cases are NOT deleted when you delete either the user or the group. This behavior may change in the future for group deletion.
Warnings
If you deleted a user, do not create another user with the same username. This can cause issues with your data.
If you just want to make sure that your users' case lists are clear you can Reassign Cases. However, please note if you reassign a case from User 1 to User 2 and then delete User 2, the case will no longer show up in any case list and all the forms associated with that case will also be deleted unless those forms are linked to any other active cases.
After deleting the user, if the cases are still appearing in the case list on your mobile device, sync with server in order to remove them. If this doesn't work, you can try resetting the user's data (Clear User Data).
Deactivating Users
In general, deactivating users is not a useful method for getting rid of data.
Deactivated users are users that no longer use the mobile phone for the project, but have still submitted real data. Deactivated users' data remains in all exports and in the submit history and case list reports. Deactivating a user will remove them from Worker Monitoring reports, but can be displayed by using the Unknown Users filter option where applicable.
Switching Project Spaces
The absolute definitive way to get rid of all data is to use a separate project space for practice and testing. If you have lots of data that you want to get rid of, this may be the best option; however it will require to set up everything in the project space again.
Picking the Right Tool
In general, if you want to get rid of a large set of project data, then the Manage Forms (Archive) feature is going to be the most helpful. However, if you want to target specific types of data, here is a chart which indicates the best tool for each goal:
Goal | Approach 1 (warnings) | Approach 2 (warnings) |
---|---|---|
Get rid of cases | Archive or delete all of the forms that created the cases (other form data associated with the cases will still be accessible) | Reassign the cases to another a different user and then delete that user (it is not possible to reassign submitted forms) |
Get rid of forms | Archive the forms (then delete the form, if desired) | Delete the user that submitted the form (you cannot undo this action; all data submitted by the user will be permanently deleted) |
Get rid of users | Delete the users (you cannot undo this action; all data submitted by the user will be permanently deleted) | Deactivate the users (this is useful if you want to temporarily hide them from worker monitoring reports, but will not hide any data associated with the users) |