iPadOS not releasing memory

I have just upgraded from DTTG2 to DTTG3. My main database did not make the transition cleanly and there were lots of sync problems. I have subsequently decided to switch to only syncing metadata and downloading documents as I need them, as the 3 databases I am syncing were taking too much memory (~ 57 GB). I deleted DTTG2 and its data, but DTTG3 is still using the shared data so the total memory used is the same.

I then deleted all 3 databases from DTTG3, closed all running apps and rebooted iPadOS.
I changed the sync to only keep 250 items (which I understand means that only metadata is synced) and I am using manual sync (with network connection). I then synced 2 small databases and DTTG reports size total of ~ 1.6 GB. iPadOS reports DTTG 3.7.2 with documents and data storage of ~ 42 GB. It appears that much of the DTTG data has not been released. How do I recover the memory?

iPadOS also counts e.g. Spotlight metadata and temporary files as well as the DTTG 2 data store. It will be deleted by DTTG 3 in three months after the migration of the data store to version 3.

Thanks for the speedy reply. I have since deleted DTTG 3, rebooted and reinstalled it, but that does not seem to have helped.