Hi Galaxy team, We performed a database and datasets purge of our Galaxy server. We decided to delete and purge few user accounts. We supposed that the purge of a user would trigger cascade deletions in database. So we used the web interface to delete and to purge these accounts. Then we launched cleanup_dataset.py in several ways: python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -1 -r > cleanup_1.log python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -2 -r > cleanup_2.log python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -3 -r > cleanup_3.log python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -5 -r > cleanup_5.log python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -4 -r > cleanup_4.log python scripts/cleanup_datasets/cleanup_datasets.py universe_wsgi.ini -d 1 -6 -r > cleanup_6.log After a simple control, I can see that some datasets belonging to (and only to) purged user accounts are still present with a status : deleted = t and purged = f. Moreover, some datasets (not shared with other users or linked to a library) have the status deleted = f and purged = f. When I look at the history status associated with the dataset, I can obtain deleted = t and purged = f. So, the purge of a user account don't change the status of his histories and datasets. Do you thing that I can change the history status 'deleted = f to deleted = t, and purged = f to purged = t' for all purged users ? I expect that the cleanup script launches the cascade purge ! below the sql command: // all datasets belonging to at least one purged user (shared or not) select D.id as "dataset id",U.email, D.deleted as "dataset deleted", D.purged as "dataset purged" , H.deleted as "history deleted" ,H.purged as "history purged" from galaxy_user U,history H ,history_dataset_association A, dataset D where A.dataset_id=D.id and H.id=A.history_id and U.id=H.user_id and D.id in (select D.id from galaxy_user U,history H ,history_dataset_association A, dataset D where A.dataset_id=D.id and H.id=A.history_id and U.id=H.user_id and U.deleted = 't' and U.purged = 't') order by D.id;