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 old AppMap binaries #1007

Open
dustinbyrne opened this issue Aug 22, 2024 · 1 comment
Open

Delete old AppMap binaries #1007

dustinbyrne opened this issue Aug 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dustinbyrne
Copy link
Contributor

Problem

The AppMap plugin currently does not clean up older versions of AppMap binaries located in the $HOME/.appmap (Linux/macOS) or %HOME%/.appmap (Windows) directory. This can lead to unnecessary storage usage as multiple old versions accumulate over time. The goal is to remove all older versions of the binaries and ensure that only the most recent version is retained moving forward.

Analysis

To resolve this issue, we need to implement a cleanup function that scans the AppMap binaries directory and deletes all but the most recent binary. The most recent binary can be determined by the semver version number in the file name.

Furthermore, we should integrate this cleanup function to be automatically executed whenever a new AppMap binary is downloaded or installed. This ensures that the directory is consistently maintained with only the latest version, preventing storage bloat.

@dustinbyrne dustinbyrne added the bug Something isn't working label Aug 22, 2024
@zermelo-wisen zermelo-wisen self-assigned this Aug 26, 2024
@kgilpin
Copy link
Contributor

kgilpin commented Sep 26, 2024

We could do this with a CLI command.

Might be safer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants