Skip to content

Add a clean command to inverse devbox init #2335

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

Open
trya2l opened this issue Oct 8, 2024 · 4 comments
Open

Add a clean command to inverse devbox init #2335

trya2l opened this issue Oct 8, 2024 · 4 comments
Labels
feature New feature or request good first issue Good for newcomers triage Issue needs triage

Comments

@trya2l
Copy link

trya2l commented Oct 8, 2024

What problem are you trying to solve?

Sometimes, I start using devbox in a folder, but I later on decide to migrate to another one, for different considerations.

In this case, I'd like to rapidly clean up the folder, but then I need to do that manually, even if this is not a complex task.

What solution would you like?

I'd love something like devbox clean to remove devbox from the current folder (including direnv when the devbox generate direnv has been invoked)

Alternatives you've considered

Currently, I remove everything manually

rm -rf .devbox devbox.* .envrc

@trya2l trya2l added feature New feature or request triage Issue needs triage labels Oct 8, 2024
@Lagoja Lagoja added the good first issue Good for newcomers label Oct 8, 2024
@Lagoja
Copy link
Contributor

Lagoja commented Oct 10, 2024

@DerArkeN @trya2l -- are you sure that you'd want to delete the devbox.json as well? I worry people might run this to clear their .devbox and devbox.lock state and lose their devbox.json unexpectedly.

@truearken
Copy link
Contributor

I am with you on this one. Maybe add a "--hard" or similar if you want to delete the config as well?

@trya2l
Copy link
Author

trya2l commented Oct 10, 2024

@DerArkeN thanks for the PR, that was fast!

@Lagoja You're right, I didn't consider the potential side effects.

I'm unfamiliar with devbox under the hood, but as @DerArkeN mentionned, a flag --hard, --all, --force, ... could be a good way to go, I guess.

Now that I regard this more seriously, even if a lot of software doesn't provide the ability to clean/revert the changes applied, as a user, this still looks like a desirable feature, even more so if it doesn't conflict with future enhancements.

@truearken
Copy link
Contributor

can we link the right pr to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers triage Issue needs triage
Development

Successfully merging a pull request may close this issue.

3 participants