Select to view content in your preferred language

How to remove/delete MyProject folder and geodatabase

2694
7
Jump to solution
09-15-2023 03:25 PM
Craig_Eissler_Iceman
Frequent Contributor

How can I remove or delete the MyProject folders and geodatabase from Catalog? (see below)

Or, better yet, is there a good way to avoid this in the first place?

Thanks,

Craig_Eissler_Iceman_0-1694816596804.png

 

0 Kudos
2 Solutions

Accepted Solutions
AdrianWelsh
MVP Honored Contributor

Yup. Go to the settings where Dan posted a screenshot and you can modify your Pro projects to do what you need. This will only work for newly created projects, going forward. For existing projects, to delete the default gdb, you first have to make another gdb the 'default' (right click on it from the Catalog and make it the default). Then you can delete the not-used gdb.

View solution in original post

0 Kudos
HaydenWelch
Frequent Contributor

Every project needs a default database. You can reassign that database to whatever you want after it's created, but without somewhere to write data, there's no way to run geoprocessing tools.

You can't delete it while the project is open (or immediately after it's closed) because ArcPro will maintain a lock on the default database that tells Windows to not allow it to be deleted.

What I tend to do is just rename my default database to "scratch.gdb". It's useful to have for intermediate operations on SDE datasets, like copying out some features, running another operation, then validating that workflow before committing those edits to the main data store.

If you want a "Default" or "Scratch" folder in your project, you can create one and move your scratch stuff there. I usually set up project templates that way so the directory structure is more human readable.

View solution in original post

0 Kudos
7 Replies
AdrianWelsh
MVP Honored Contributor

Craig,

The My Project geodatabase is created with your project and is the default geodatabase. It has to remain in the project folder. If you don't want it, you need to assign another geodatabase as the default geodatabase, and then you can remove it. If you truly wanted to delete it, just go to the folder in which your project was created and delete it there. This will cause your project to not work properly as it will be looking for the geodatabase. Why do you want to delete your default geodatabase? 

0 Kudos
Craig_Eissler_Iceman
Frequent Contributor

Thanks, Adrian, I'm not using my default geodatabase so I don't need it.
So, I'm not sure why deleting it would cause my project not work correctly..?

Instead of the default geodatabase, I tend to use Geodatabases already created with the data I need for my projects, or I just create my own when I need to. ...Honestly, I've never quite understood the purpose of the default geodatabase.

As it stands now, I have over 200 MyProject folders/geodatbases that are just wasting space. I get an Error  when I attempt to delete them -- see screenshot. Is this perhaps a problem with my OneDrive where they're stored?

Craig_Eissler_Iceman_0-1694819460160.png

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

What Adrian is referring to is in the Project backstage

options.png


... sort of retired...
AdrianWelsh
MVP Honored Contributor

Yup. Go to the settings where Dan posted a screenshot and you can modify your Pro projects to do what you need. This will only work for newly created projects, going forward. For existing projects, to delete the default gdb, you first have to make another gdb the 'default' (right click on it from the Catalog and make it the default). Then you can delete the not-used gdb.

0 Kudos
Craig_Eissler_Iceman
Frequent Contributor

Unfortunately, the 'General Options' don't really solve my problem because there is NO option for NOT creating a default Geodatabase. Personally, I think I'd just rather have a default 'Folder' that stores everything for my Project, and then "Browse" from there where I want to save my outputs.

With that, just changing the default geodatabase in an existing project doesn't really solve things either.

So, I'm just down to how to Delete my default MyProject projects (.aprx's)..? And, I get an Error when I attempt to.

HaydenWelch
Frequent Contributor

Every project needs a default database. You can reassign that database to whatever you want after it's created, but without somewhere to write data, there's no way to run geoprocessing tools.

You can't delete it while the project is open (or immediately after it's closed) because ArcPro will maintain a lock on the default database that tells Windows to not allow it to be deleted.

What I tend to do is just rename my default database to "scratch.gdb". It's useful to have for intermediate operations on SDE datasets, like copying out some features, running another operation, then validating that workflow before committing those edits to the main data store.

If you want a "Default" or "Scratch" folder in your project, you can create one and move your scratch stuff there. I usually set up project templates that way so the directory structure is more human readable.

0 Kudos
Craig_Eissler_Iceman
Frequent Contributor

Thanks, Hayden ...yes, I do understand the need for a default geodatabase; I guess what I meant to say, was that I would like to make that designation, and not ArcGIS. But, I don't necessarily want to be forced to make that designation upon creating anew project because I may not know just yet how things re going to play out in my analysis. 

However, I do you like your idea of just renaming it to "Scratch" or something like that, and using for that purpose (just testing things out, intermediate data, etc.).

As for being able to "delete" old 'MyProjects': It was a OneDrive issue that was not syncing. But, now that it is, I'm able to delete those old folders and files.