Unlink all children from the scene collection
Not a fan of using outliner operators in scripts. Unlinking or removing the collections from a scene will also have the same effect of clearing a scene.
Script to unlink all the child collections from the scene's master collection.
context = bpy.context
scene = context.scene
for c in scene.collection.children:
Theoretically could remove the child collections using
bpy.data.collections.remove(c) above instead of unlink, however I found this has the tendency to seg fault my build of 2.8._ (See EDIT below)
Running this after removes the orphan collection
for c in bpy.data.collections:
if not c.users:
Similarly could remove the collections objects from blender file with
for o in c.objects:
EDIT. Update: removing collections from bpy data
name = "Collection 1"
remove_collection_objects = True
coll = bpy.data.collections.get(name)
obs = [o for o in coll.objects if o.users == 1]