Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する
Command Reference

cleanup


The blocklet server cleanup command is an administrative tool used to maintain the health and performance of a Blocklet Server instance. It allows you to selectively clear server-level resources such as the cache, router blacklists, and maintenance status flags. This is particularly useful for troubleshooting, freeing up resources, or resetting the server's state after operations like an upgrade.

Usage#

To use the command, you must specify a cleanup target.

blocklet server cleanup <target>

Arguments#

<target>#

This is a required argument that specifies which resource to clean up. The available targets are detailed below:

Target

Description

cache

Clears all items from the server's cache.

maintenance-status

Resets the server's maintenance mode status, which is often set during an upgrade. This command returns the server to its previous operational mode.

blacklist

Removes all entries from the router's IP blacklist, immediately allowing previously blocked IPs to access services.

blacklist-expired

Removes only the entries from the router's IP blacklist that have passed their expiration time.

Cleanup Process Flow#

The command's execution flow is determined by the target argument provided.

cache

maintenance-status

blacklist

blacklist-expired

other

blocklet server cleanup

Check target value

Clear server cache

Reset maintenance mode

Clear entire router blacklist

Clear expired router blacklist

Print 'Unknown cleanup target'

Print Success Message


Examples#

Clear Server Cache#

This command purges all data from the Blocklet Server cache.

Command

blocklet server cleanup cache

Response

Cache for server cleared: [cache_keys...]

Reset Maintenance Status#

If a server is stuck in maintenance mode after an upgrade or other operation, this command resets its status to restore normal functionality.

Command

blocklet server cleanup maintenance-status

Response

Server maintenance status reset

Clear Entire Router Blacklist#

This command removes all IP addresses from the router's blacklist.

Command

blocklet server cleanup blacklist

Response

All router blocklist cleared

Clear Expired Blacklist Entries#

This performs a more targeted cleanup, removing only the IP addresses whose blacklist duration has expired, while keeping active blocks in place.

Command

blocklet server cleanup blacklist-expired

Response

Expired router blocklist cleared


The cleanup command is a key utility for server administration. After performing a cleanup, you may want to check the server's current condition using the status command or review recent activity with the logs command.