Cleanup Blocklet


The blocklet cleanup command is a utility for performing maintenance tasks on a specific blocklet installed on your Blocklet Server. It allows you to clear a blocklet's dedicated cache or disable its automatic backup configuration.

This command is particularly useful for troubleshooting or managing a blocklet's storage footprint.

Command Usage#

The basic syntax for the cleanup command is as follows:

blocklet cleanup <target> --app-did <did>

Arguments and Options#

Argument/Option

Description

target

Required. The cleanup task to perform. Valid values are cache or backup.

--app-did <did>

Required. The DID of the blocklet you want to clean up.

Cleanup Tasks#

You can perform two distinct cleanup tasks: clearing the cache and disabling backups.

Clear Blocklet Cache#

This task removes all cached data associated with a specific blocklet. This can be useful if you suspect corrupted cache data or want to free up space.

Clear cache for a specific blocklet

blocklet cleanup cache --app-did z8iZufgv3e2yYAmH4L53s83wbeG7eWz4WADS

Upon successful execution, the CLI will confirm that the cache has been cleared and list the removed items:

Success output

Cache for app z8iZufgv3e2yYAmH4L53s83wbeG7eWz4WADS cleared: [items]

Disable Auto-Backup#

This task disables the automatic backup feature for a specific blocklet. It does this by clearing the backup endpoint configuration and turning off the auto-backup setting.

Disable auto-backup for a specific blocklet

blocklet cleanup backup --app-did z8iZufgv3e2yYAmH4L53s83wbeG7eWz4WADS

After running the command, you will see a confirmation message:

Success output

Blocklet z8iZufgv3e2yYAmH4L53s83wbeG7eWz4WADS auto-backup disabled

This command provides a straightforward way to manage the persistent data of your blocklets. For other advanced management tasks, you may also be interested in DID Document Management.