My custom app's doctype not being removed in production after running bench migrate

How do Custom Application’s doctypes sync between dev and prod?

I have deleted custom app’s doctype let’s say custom_doc on my dev environment. I git pushed from dev and git pulled from prod. I found that after bench migrating, the custom_doc folder was still there in the doctypes folder of the custom app, and in the db as well. For some odd reason git wasn’t tracking it hence it didn’t removed it, I confirmed it after running ‘git clean -nxd’ and then manually removed it. It’s still there in the db and shows up in awesome bar after running migrate. Then I tried bench migrate last time with developer_mode = 1 on prod, yet still it’s there.

What am I doing wrong? Did I miss a step?

@Adeel_Siddiqui is the doctype folder still exists in the custom app github ?

No it doesn’t exist and neither in my dev, and I manually deleted the folder in the prod environment. How does bench migrate know which doctypes to remove, or add, and is there a list somewhere it maintains? Cause it tracks changes through doctype’s own json file I think.