When attempting to delete detached items from Portal for ArcGIS the following error message is returned:
Error: Unable to delete item. <URL> may no longer be accessible.
This issue can occur if the URLs of the items hosted in Portal for ArcGIS are no longer valid when changes are made to Portal's configuration settings, along with un-federating and re-federating the Portal environment. The hosted items may still exist in My Content, but it may no longer be accessible by Portal web maps.
In the event the detached items cannot be deleted, or if the error occurs, the following workaround allows for manual deletion of these items:
Note: The Item ID appears as a long alphanumeric code.
Note: The portal content directory is commonly found at: <Portal for ArcGIS installation directory>/arcgis/portal/usr/arcgisportal/content
Note: If the problem persists, reindex Portal for ArcGIS, and delete the item. Refer to ArcGIS REST API: Reindex for more information.