Force Delete an Item in Portal for ArcGIS

26539
40
03-07-2016 09:35 AM
Jay_Gregory
Occasional Contributor III

I'm having problems deleting an item in Portal for ArcGIS.  It is delete protected so I can't delete using the UI.  I am unable to change the delete protection because the edit button is also disabled.  I used ArcGIS Online Assistant and tried to change the delete protection from there but the change from true to false wouldn't actually take.  It just kept reverting back.  I tried to find the xml or json file in the item ID folder on the Portal server itself, but I couldn't find the delete protection attribute.  I'm hesitant to just outright delete the item ID folder itself because I don't know if the item ID is registered anywhere else (a user's item list for instance).  Could anyone instruct me on a thorough way to force delete an item from Portal for ArcGIS?

40 Replies
SimonJackson
Occasional Contributor III

I also getting this.  Unfederated, did a fresh install of ArcGIS Data Store, and removed the services via manager.  

Federated and added the GIS Server as a hosting server, but that leaves me with a bunch of stray items for the services that no longer exist in the GIS Server/ArcGIS Data Store.

Was assuming performing a reindex on portal via portaladmin would fix things up, but no luck.

Any other suggestions?

0 Kudos
ChelseaRozek
MVP Regular Contributor

I'm also dealing with stray items in Portal. Nothing shows up in Server Manager to delete, I have a hosting server set up, there isn't delete protection on these items, and whenever I try to delete it says "Unable to delete item." I'm hoping there's a workaround aside from reinstalling things.

0 Kudos
ChelseaRozek
MVP Regular Contributor

Update: ESRI support helped me clean up these items. We copied their item ids, turned off the Portal for ArcGIS service, then went into {install drive}:\ArcGIS\arcgisportal\content\items and deleted the folders with those ids. When we turned the Portal for ArcGIS service back on and went into My Content, the items were gone

Tech Article: Problem: Unable to delete orphaned items in Portal for ArcGIS 

0 Kudos
GangWang
New Contributor III

Strange. I followed the same way, but after restarting the portal windows service. I still can see the item from portal under my content although i can't open it. Any ideas why? By the way, portal version is 10.6.1.

0 Kudos
ChelseaRozek
MVP Regular Contributor

Not sure why it didn't work for you. I'd suggest opening a support ticket with ESRI. If you learn of anything new to help fix the issue, please share with us!

0 Kudos
GangWang
New Contributor III

My case is a web map with a few orphaned map services. I had to remove these map services from the web map then save it, then I was able to delete the web map.

0 Kudos
milesleeaus
New Contributor II

Some times even you deleted the item folder in C:\arcgisportal\content\items, the item you want to delete will still be displayed on Portal web. You need to do there more steps:

1. Recreate an empty item folder manually with the folder name as the same ItemID you just deleted in C:\arcgisportal\content\items

2. You open any another item folder in C:\arcgisportal\content\items, and then copy the esriinfo subfolder inside to you new created empty item folder. 

3. Then now you could go to your portal content on web, select your item and delete it smoothly. I promised this can work, as I tried 15 hours to find out this method for my case.

 

Thanks

Aaron-L
New Contributor II

Just wanted to comment on @milesleeaus new reply to this 6 year old thread to say that this worked for us. I found I had to be a little careful on which "esriinfo" subfolder I copied as one of them I used I could not delete the phantom item still. After switching to another one, then the item deleted succesfully.

We've had an open support ticket for 3 months and have tried just about every trick in this thread (reboot, re-index, manually delete the folder, rest service delete, upgrade from 10.9 to 10.9.1, etc..) and were still unable to delete phantom items that showed up in the portal. 

0 Kudos
JeffLegato1
Occasional Contributor

This solved our issue!  Thank you!

0 Kudos
arahman_mdmajid
Occasional Contributor

Thank you @milesleeaus as this solved our issue. Since the item was manually removed, the item was still showing as null type in the list of items under the username at the following url

https://<domain-name>/enterprise/sharing/rest/content/users/<user-id>

We were getting an error while executing the WebGISDR tool and following the instruction here 

Why do I receive an error about a missing item when creating a backup of my portal?

Hope it helps others too.

Abdur Rahman
GIS Developer
0 Kudos