diff options
Diffstat (limited to 'src/frontend/cli')
-rw-r--r-- | src/frontend/cli/README.md | 16 | ||||
-rwxr-xr-x | src/frontend/cli/sisyphus-cli.py | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/frontend/cli/README.md b/src/frontend/cli/README.md index c831afc..edaf9cd 100644 --- a/src/frontend/cli/README.md +++ b/src/frontend/cli/README.md @@ -21,6 +21,7 @@ $ sisyphus [OPTIONS] COMMAND [ARGS]... **Commands**: * `autoremove`: Uninstall packages that are no longer needed. +* `autoclean` : Clean the binary package cache... * `branch`: Pull the selected branch of the Portage tree,... * `install`: Install binary and/or ebuild(source)... * `mirror`: List/Set the active binhost (binary repository) mirror. @@ -49,6 +50,21 @@ $ sisyphus autoremove [OPTIONS] * `--help`: Show this message and exit. + +## `sisyphus autoclean` + +Clean the binary package cache and the source tarball cache + +**Usage**: + +```console +$ sisyphus autoclean [OPTIONS] +``` + +**Options**: + +* `--help`: Show this message and exit. + ## `sisyphus branch` Pull the selected branch of the Portage tree, Redcore overlay and Portage configs. diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py index 93963dd..ff918b8 100755 --- a/src/frontend/cli/sisyphus-cli.py +++ b/src/frontend/cli/sisyphus-cli.py @@ -174,6 +174,14 @@ def autoremove(): """ sisyphus.autoremove.start() +@app.command("autoclean") +def autoclean(): + """Clean the binary package cache and the source tarball cache""" + if sisyphus.checkenv.root(): + sisyphus.purgeenv.cache() + else: + sys.exit("\nYou need root permissions to do this, exiting!\n") + @app.command("update") def update(): """Update the Portage tree, the Redcore Overlay(s), Portage configs and Sisyphus's package database.""" |