![arcgis file management arcgis file management](https://esriaustralia.com.au/sites/default/files/styles/50_50_row/public/2021-01/arcgis-pro-data-management-os-store-data.png)
If you delete the file from which a hosted layer was published, you'll receive a message warning you there are dependent layers.
![arcgis file management arcgis file management](https://desktop.arcgis.com/en/arcmap/latest/extensions/workflow-manager/GUID-89692F2B-1561-4C9A-8761-964827DD2DB0-web.png)
Once you delete all dependent layers, you can delete the hosted feature layer or file. This message provides links to view and delete each dependent layer. When you attempt to delete a file or hosted feature layer that has dependent layers using the Delete button on the item's detail page, a message appears that lists the dependent layers. The presence of dependent layers prevents you from deleting the hosted feature layer from which the dependent layer was created. Deleting the dependent layers you created from the hosted feature layer does not delete the data. If you created the layer from an existing hosted feature layer instead, the existing hosted feature layer is the primary layer and is considered the data source. If you published the hosted layer directly to your portal, deleting the hosted layer deletes the underlying data the layer represents. Before you do, you should understand the dependencies between layers and data. If you no longer need a hosted layer, you may want to delete it.
![arcgis file management arcgis file management](https://slideplayer.com/slide/6170691/18/images/3/Arc+Tool+Box+ArcMap+Data+Management.jpg)