Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete project even with ddev delete --omit-snapshot <name> #2464

Closed
begrafx opened this issue Aug 19, 2020 · 8 comments
Closed

Unable to delete project even with ddev delete --omit-snapshot <name> #2464

begrafx opened this issue Aug 19, 2020 · 8 comments

Comments

@begrafx
Copy link

begrafx commented Aug 19, 2020

Running MacOS Mojave, I have a folder called Projects and in there, I place the various folders for ddev projects. (i.e. Projects/site1, Projects/site2, etc. ) recently, fingers working faster than the brain, I did a ddev config in the Projects root. I attempted a ddev delete --omit-snapshot Projects and the result was

$ ddev delete --omit-snapshot Projects OK to delete this project and its database? Projects in /Users/brianeller-mini/Projects The code and its .ddev directory will not be touched. OK to delete Projects? [Y/n] (yes): yes Network ddev_default is external, skipping Deleting database. Volume Projects-mariadb for project Projects was deleted Unable to delete drud/ddev-dbserver-mariadb-10.2:v1.15.1-Projects-built: no such image Unable to delete drud/ddev-webserver:v1.15.3-Projects-built: no such image Project Projects was deleted. Your code and configuration are unchanged. Network ddev_default is external, skipping Brians-Mac-mini:Projects brianeller-mini$ ddev list NAME TYPE LOCATION URL STATUS 829 drupal8 ~/Projects/829 stopped D8-Themer drupal8 ~/Projects/d8_themer stopped Projects php ~/Projects .ddev/config.yaml missing

So it's still there. Is there another command I should be using to get rid of that? I'm still relatively new to DDEV, so I prefer to ask questions, rather than blow something up.

@rfay
Copy link
Member

rfay commented Aug 19, 2020

That looked successful to me. Does ddev list still show it?

@rfay rfay changed the title Can't delete... Unable to delete project even with ddev delete --omit-snapshot <name> Aug 19, 2020
@begrafx
Copy link
Author

begrafx commented Aug 19, 2020

Yes.

Projects php ~/Projects .ddev/config.yaml missing

@rfay
Copy link
Member

rfay commented Aug 19, 2020

You can always just delete that line from ~/.ddev/global_config.yaml

I wasn't able to read the output of your delete command very well; you can use three backticks on a line before and after to keep everything with linebreaks.

@begrafx
Copy link
Author

begrafx commented Aug 19, 2020

That worked. Thank you. I'm always hesitant to just go editing files if I'm not certain of the result. I appreciate your prompt responses.

@rfay
Copy link
Member

rfay commented Aug 19, 2020

Thanks! Closing, happy to continue the conversation.

@rfay rfay closed this as completed Aug 19, 2020
@gitressa
Copy link
Contributor

gitressa commented Nov 2, 2023

I have also accidentally created a DDEV project in my development folder ~/dev (/home/username/dev). I have done this more than once, both when I was just starting with DDEV, and even recently.

For me it was the other way around. I was getting a .ddev/config.yaml missing message, even though there was no mention of a "dev" project in the ~/.ddev/global_config.yaml file.

$ ddev list
┌─────────┬───────────────────────────┬───────────────┬─────────────────────────┬──────────┐
│ NAME    │ STATUS                    │ LOCATION      │ URL                     │ TYPE     │
├─────────┼───────────────────────────┼───────────────┼─────────────────────────┼──────────┤
│ mydev   │ OK                        │ ~/dev/mydev   │ https://mydev.ddev.site │ drupal10 │
├─────────┼───────────────────────────┼───────────────┼─────────────────────────┼──────────┤
│ dev     │ .ddev/config.yaml missing │ ~/dev         │                         │          │

[...]

Running ddev delete dev --omit-snapshot fixed it, and the lingering project is no longer in the list.

Since new and even seasoned DDEV users may run DDEV commands where they really didn't want to, I wonder if it would make sense to add a feature, where you can define "safe" folders to run DDEV commands from? I have created #5493.

@ariademur
Copy link

You can always just delete that line from ~/.ddev/global_config.yaml

I had the same problem and for me the file to edit was ~/.ddev/project_list.yaml.
Hope this helps someone.

P.S. Thank you very much for the great project!

@rpkoller
Copy link
Collaborator

that is correct @ariademur, as well as @gitressa's comment was correct back then. before ddev 1.23.0 the project list was contained within the global_config.yaml file. with the release of 1.23.0 in april the projects got moved to the newly introduced project_list.yaml file. just to provide some context for anyone stumbling about both comments. thank you for noticing and commenting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants