Force Delete an Item in Portal for ArcGIS

16137
35
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?

35 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
AdamChavez1
New Contributor II

Using the ArcGIS Online Assist tool:https://ago-assistant.esri.com/

Log into the Portal/account that owns the items that are phantoms.

Next, click on the item ID, preferably on a new window

Next, it should take you to the item you couldn't access before to delete through normal delete procedure.

You may have to repeat 5 to 10 times as the phantoms often have duplicates.

In my case, once the phantoms were all deleted, it let me successfully delete the user account that "OWNED ITEMS" previously.

0 Kudos
DrewCover
New Contributor III

Hello all,

Similar problem with my portal.  After re-federation, I have an orphaned dataset, which is delete protected.  Online Assist (cool tool btw) cannot help me, the json url is linked to an old webadaptor name and details page will not display, and it will not save changes when editing the JSON file directly in Online Assist.

Also tried the esri workaround.  Stopped portal thru my windows server 'Services', deleted the file in the Portal content directory, restarted, annnnd the stupid file is still staring up at me in the online Content.  But now it doesn't give a delete protection error, it just thinks forever when any request is made to the layer.

Not the worst problem to have with Portal, but it vex's me greatly, my Portal must be clean and perfect!

Thank you for any suggestions

SimonLynch
New Contributor III

Hi, I have had success with a method to remove 'orphaned items' from Portal.

My Infrastructure: Portal 10.6.1 with Federated AGS.

See: Delete Item—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers . As noted in the Help this procedure only works at 10.6.1 and applies to Portal or AGO. My example was with our Portal.

1. Format the URL to perform the Post function in the browser. This was a little tricky but i got it to work. So what i did was start with the convention used to perform a (similar simpler) Post call such as 'Root Post call' (Root—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers ). Once you get that one working move onto the required 'Delete Item' Post request (link above).

2. Source the 'Item ID' of the feature you want to 'delete' from your Portal (the alphanumeric code number of the item in Portal).

3. Login as an Admin (Site Admin) when prompted.

4. I checked the tick box 'Force delete' when prompted.

5. Vwella (Fingers crossed)!

Hope this helps.

DrewCover
New Contributor III

Nice angle, but didn't work for my 10.6 Portal/Server.  The url and physical path no longer exist.  Anybody think i could re-Generate the feature from rest services, then get it happily deleted?

Error snip below: