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

Support "aqua remove" or "aqua clean" - removing package #538

Closed
borley1211 opened this issue Jan 12, 2022 · 10 comments · Fixed by #2249
Closed

Support "aqua remove" or "aqua clean" - removing package #538

borley1211 opened this issue Jan 12, 2022 · 10 comments · Fixed by #2249
Labels
command:remove enhancement New feature or request

Comments

@borley1211
Copy link

borley1211 commented Jan 12, 2022

---
  # aqua - Declarative CLI Version Manager
  # https://aquaproj.github.io/
  registries:
  - type: standard
    ref: v0.13.1 # renovate: depName=aquaproj/aqua-registry

  packages:
  - name: cli/[email protected]
- - name: junegunn/[email protected]
$ aqua clean  # remove package automatically
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jan 12, 2022
@suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke suzuki-shunsuke changed the title パッケージの削除をサポート Support removing packages Jan 12, 2022
@suzuki-shunsuke
Copy link
Member

We have no plan to support this.
If the directory becomes huge, you can clean it by yourself.
https://aquaproj.github.io/docs/reference/clean

@borley1211 borley1211 changed the title Support removing packages Support "aqua remove" or "aqua clean" - removing package Jan 12, 2022
@suzuki-shunsuke

This comment has been minimized.

@borley1211
Copy link
Author

Surely that's difficult... Sorry.

@suzuki-shunsuke
Copy link
Member

No problem. Thank you for your proposal.

@borley1211
Copy link
Author

Perhaps a command like aqua cleanup, which can reset the environment in one operation, might be more useful.

@suzuki-shunsuke
Copy link
Member

I'm reconsidering this feature.
If we aim to enable to delete packages flexibly, the command usage, specification, and implementation will get complicated.
This is not desirable for both users and maintainers.

Even if you remove packages, Lazy Install will reinstall them when they are necessary, so we don't need to support deleting packages so flexibly.

So I'm thinking the simple features like the following.

$ aqua rm --all # Delete all packages (delete `pkgs` but keep `bin`)
$ aqua rm [<registry name>,]<package name> [...] # Delete given packages (delete all versions)
$ aqua rm --command [-c] <command name> # Delete packages with the given command (delete all versions)

About packages, aqua refers registries in aqua.yaml. Even if they aren't used in packages aqua can remove them.
About command, aqua refers packages in aqua.yaml.

rm command doesn't edit aqua.yaml, which means it doesn't remove packages from packages in aqua.yaml.
It also doesn't remove symbolic links from the bin directory.

You may want to keep the latest version and delete only old versions, but we don't support it now.
Lazy Install will reinstall the latest version.

@suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:remove enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants