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?
I would start by using this python script to find unused services. You can then adjust the script to delete rather then report.
Alternatively, you could use GeoJobe's Clean my Org tool. (subscription based service)
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?
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).
Thank you for the response. So the script is for Pro, but will display all services used by an online map? Is this correct?
Correct - note that the script will take a few minutes to run depending on the size of your org.