I'm trying to remove all unnecessary connections in ArcGIS Pro with ArcPy. I'm running a script which picks up ArcGIS Pro Project template and makes a copy. Then adds new database and toolbox and makes these things as the default ones. But when I open newly created ArcGIS Pro aprx, database, toolbox and folder connection from template are still there. How can I remove them?

Part of my script:

import arcpy

aprx = arcpy.mp.ArcGISProject("path to template") #path to ArcGIS Pro template 
database=arcpy.CreateFileGDB_management(Path,Name) #create database  
aprx.defaultGeodatabase=database  #set default database  
aprx.homeFolder="Path to folder"  #set default folder connection 
  • Perhaps they are amongst your Favorites in the Catalog pane.
    – PolyGeo
    Commented Oct 6, 2022 at 22:11
  • Thanks @PolyGeo. But not really. There is nothing in my favorites. If i delete for instance toolbox and database from template folder, as soon as I open template aprx, these two reappear. I think its an ESRI thing. I can however set up default home folder, toolbox and database in my newly created aprx, but i cannot remove the old ones. Commented Oct 6, 2022 at 22:24
  • Perhaps review gis.stackexchange.com/q/236262/115
    – PolyGeo
    Commented Oct 6, 2022 at 22:41

1 Answer 1


(I work at Esri)

From some planning documents, I see "Add/remove folders and databases" (connections) as a targeted item in the near term. From that, I can infer that there is no arcpy.mp command to simply remove these from the project. There still might be a way to accomplish this, but you won't find a straightforward arcpy command to do it.

Note - near term usually means within the next release or two (3.1 or 3.2), but priorities can change at any time, so this is no guarantee.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.