-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2af03f2
commit 2896e50
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 500 | ||
--- | ||
|
||
# Vacumm (Auto clean expired packages) | ||
|
||
aqua >= [v2.43.0](https://github.com/aquaproj/aqua/releases/tag/v2.43.0) | ||
|
||
Vacuum is a managed mode of aqua which permits the removal of packages not used for a specified time. | ||
|
||
## To enable it | ||
|
||
Vacuum is disabled by default. To enable it, you need to set the `AQUA_VACUUM_DAYS` environment variable to an integer greater than 0, which represents the number of days a package should not be used to be considered as unused. | ||
|
||
:::caution | ||
If you want to use this feature, we recommend setting this variable in a way that you use it with each aqua command. (~/.bashrc, ~/.zshrc, ~/.rc.d, etc.) | ||
::: | ||
|
||
## Workflow | ||
|
||
When vacuum is enabled, each time a command like `aqua install` or `aqua exec` (or any command executed through aqua) is executed, aqua will add (or update) an entry in a bbolt database with corresponding information and a timestamp of the last usage. | ||
|
||
When `aqua vacuum run` is executed, aqua will check all entries in the database and remove packages that have not been used for more than `AQUA_VACUUM_DAYS` days. | ||
|
||
Every expired package will be removed from the `pkgs` directory and from the database. | ||
|
||
## Commands | ||
|
||
```console | ||
$ aqua vacuum show [--expired] # List all packages managed by vacuum [--expired show only expired packages] | ||
``` | ||
|
||
```console | ||
$ aqua vacuum run # Run the vacuum process | ||
``` | ||
|
||
## Limitation | ||
|
||
:::caution | ||
Every package installed before the activation of vacuum will not be managed by vacuum. So to start with a clean process, we recommend launching aqua rm --all the first time. | ||
::: |