Unlink a Material
Remove the first material from the mesh.
import bpy
obj = bpy.context.object
obj.data.materials.pop(0, update_data=True)
Remove all materials.
import bpy
obj = bpy.context.object
obj.data.materials.clear()
Unlink Texface
This clears images for each face (active uv layer only)
import bpy
obj = bpy.context.object
for tf in obj.data.uv_textures.active.data:
tf.image = None
This clears images for all UV layers
import bpy
obj = bpy.context.object
for texlay in obj.data.uv_textures:
for tf in texlay.data:
tf.image = None
Update: TexFace has been removed in Blender2.8
del obdata.materials[0], Which would be the most obvious way to do this, but this way doesn't accept arguments for how to handle linked data. – ideasman42 Aug 17 '13 at 12:07