archethic-foundation / archethic-foundation/archethic-node
Remove old releases from node
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the problem you discovered
Actually when we install a new release, it compile all the file into the _build/rel/env and build folder.
But release after release, theses files are not cleaned. Each release is approximately 100 Mo, so the _build folder continue to increase it's size without utility.
Actually the archethic-node and build folder on mainnet node has a size of 1.8Go :
```bash
archethic-node@archethic-node-NUC10i5FNK:~/aebot$ du -h -d 1
2,2M ./key_certificates
1,8G ./archethic-node
1,7G ./data
1,7G ./build
8,0K ./stats
5,1G .
```
### Describe the solution you'd like
After installing a new release we should remove the old ones to free some space.
We could use the `migrate.ex` script to do this
PS: We should always keep the previous one as it is used to build the release. So we can remove all release before the previous one (current version -2)
Contributor guide
Research direction
Start by locating the migrate.ex script and inspecting how releases are installed into _build/rel/env and the build folder. Confirm how the current and previous releases are identified; done means releases older than current version minus two are removed after installation while the previous release remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- release
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100