The offline function sca_removeSharedData() removes folders under /apps
The online function deleteMetadata() removes files under folders.
Inorder to remove the root folders, you can login to MDS schema and in MDS_PATHS find your folder path '/xsd' and delete that entry from that table.
Then refresh your MDS to check whether the folder still available or not.
I hope it should not be there. It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
I feel Without touch the database i think i we cannot do it. As i at last ended with going to database
For example in my case my root folder is apps. And this one i am not able to remove through weblogic command but if i remove it from backend then it is gone.
Apart of this subfolders your want to remove it then you can use below one. I know this is not exactly you looking for but still i feel like it may help to you.
Got to:- /u01/app/soadev/product/fmw11/middleware/Oracle_SOA1/common/bin
And run wlst.sh file then connect as below
to delete only file inside the folder then deleteMetadata(application='soa-infra',server='soa_server1',docs='/apps/MDS/XSD/ItemDesc.xsd')
This is for offline command how ever it worked online also be me.. Strange
sca_removeSharedData('hostname:port','xsd','weblogic','Soa_s132')----------- this removes xsd folder under apps folder. But default this function considers apps as a root directory.
Let me know if need any information from my side