These procedures apply to Heredis Windows and Heredis macOS versions.
Via an export of the Heredis file:
Open your family tree in your version of Heredis.
Then go to the File menu > Export > Heredis (make sure to check all the boxes).
Once the export is complete, close your family tree and open the exported file.
The file's database is now cleaned up.
You can continue working from this version of your family tree.
Via an import of the Heredis file:
Open your genealogy in your version of Heredis.
Create a new genealogy via the File menu > New...
Then go to the File menu > Import > Heredis File > OK > (locate your genealogy).
Once the import is complete, save your genealogy.
The file's database is now clean.
You can continue working from this version of your genealogy.