Delete Data of extra domains while switching from 13 to 14

I am switching from version 13 to version 14. I am only using ERPNext and HR related domains. I want to delete all other tables / schema from data.
Is there any way to remove extra doctypes / tables to clean the data.