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

delete operation should delete profiles/<profile> folder rather than only delete config.json file #4570

Closed
perrywang opened this issue Jun 24, 2019 · 4 comments · Fixed by #4572
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@perrywang
Copy link

Problem
delete operation should delete whole folder profiles/<profile>
The exact command to reproduce the issue:
execute minikube delete, only profiles/<profile>/config.json get deleted and an empty folder profiles/<profile> left.

@tstromberg
Copy link
Contributor

tstromberg commented Jun 24, 2019

Good find. That approach sounds fully reasonable. I'd be happy to review any PR that makes it happen.

cmd/minikube/cmd/delete.go is the file that requires an update. After it deletes the profile file, it should calculate the profile directory and attempt to remove it.

@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 24, 2019
@fenglixa
Copy link
Contributor

I would like to provide PR for this issue. Thanks @tstromberg @perrywang

@LuChenjing
Copy link

As complementary,
For minikube vm driver "none" in Linux, the whole folder profiles/ will be deleted after executing "minikube delete",
but for minikube vm driver "virtualbox" in Windows, it won't be deleted, and also the config.json file inside. Only the "disk.vmdk" and folder in machines/profile/ will be removed.

@kumarom
Copy link
Contributor

kumarom commented Jun 26, 2019

@medyagh shouldn't we also cleanup stale context/user/cluster from ~/.kube/config ? Or is it already taken care of..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants