How to check if a field exists on a section When you remove a field from Craft, the data itself doesn’t disappear. So removing i.e. an intro field from a section, if that intro field is still used in the template, that content will be output still on an entry.

Presumably this is intentional more than a bug so that Craft doesn’t have to go and re-save all of the entries in that section, which would probably cause the webserver to catch on fire (therefore I’m not going to write a plugin to hook into the save entry hook to clear it).

Is there a way to check in twig if a field is on a given section? The “if x defined and x|length” check passes because this data exists against the entry, even if the fields isn’t on the section.

I’m using a template for multiple sections that share a similar set of fields for a preview, and don’t want to replicate 99% identical templates.
I think you're running in to a caching issues here or you're not testing with devMode turned on perhaps.

I've just tested here and if I remove a field and reload an entry in devMode I immediately get an exception e.g.:

Craft\Commerce_ProductModel and its behaviors do not have a method or closure named "unimformityMeasurement". 

Actually, even with devMode off I get a 500 server error with the same information, so I am thinking that you're very likely hitting a cached result that is preventing you from  seeing these errors.

(In my experience you are correct the data is still in the database though).