Thanks for the response. It does help me access the orphan data.
Just one thing, is there a way to recall the previous
rotation values of the orphan mesh? Currently, when I relink it again, it snaps back to the world origin.
Here is my working code:
orphan_list = [m for m in bpy.data.meshes if m.users == 0]
col = bpy.data.collections
for orphan in orphan_list:
object = bpy.data.objects.new(orphan.name, orphan)
Apologies for the late response.
The code above helps you relink the orphan mesh back to the collection