Giel,
Mendix has developed a tool for this situation. You can read about it here: https://docs.mendix.com/refguide10/troubleshoot-repository-size/#cleanup-tool
Hope that helps,
Mike