Is there an efficient way to delete all layers/data not being used on maps/applications?

327
5
11-20-2019 01:38 PM
MatthewKatz
New Contributor

My organization has a large amount of layers that are unused in either maps or applications. While there is also a large amount that are used within maps and apps, it seems it will be tedious to go through each map and app, see which layers are being used, and then search through all the layers to deleted the unused layers. Is there a more efficient way to delete all the layers/data that isn't being used in a map or app? 

Thank you!

Tags (2)
Reply
0 Kudos
5 Replies
ClayDonaldsonSWCA
Occasional Contributor

I would start by using this python script to find unused services. You can then adjust the script to delete rather then report.

Find Unused Services - GitHub

Alternatively, you could use GeoJobe's Clean my Org tool. (subscription based service)

Reply
0 Kudos
MatthewKatz
New Contributor

Clay,

Thank you for the reply. My knowledge of coding is very limited, so I am slightly confused. How would I input this python script into my ArcGIS online, in order to show which services are unused within my content?

Reply
0 Kudos
ClayDonaldsonSWCA
Occasional Contributor

This script you would run on your local computer using an the built in IDLE or Juypter Notebooks that comes installed with Pro.

You can copy and paste the code into the python window in pro, it will display all of the services in the terminal. I adjusted that script for my personal use to export to a .xlsx instead.

Honestly, Clean my Org is going to be the more non-programmer friendly option. Unfortunately, arcgis online does not have any built in tools that can accomplish what you are asking for (aside from the python api).

MatthewKatz
New Contributor

Thank you for the response. So the script is for Pro, but will display all services used by an online map? Is this correct?

Reply
0 Kudos
ClayDonaldsonSWCA
Occasional Contributor

Correct - note that the script will take a few minutes to run depending on the size of your org.

Reply
0 Kudos