mqttui-clean-retained(1)
okay bestie, welcome to the mqttui-clean-retained(1) page from the General Commands Manual β this is the mqttui-clean-retained command, and it's here to clean retained messages from the broker. no cap, let's get into it π
β¨ NAME β¨
mqttui-clean-retained β clean retained messages from the broker π§Ή
πΈ SYNOPSIS πΈ
mqttui clean-retained [--timeout] [--dry-run] [--qos] [-b|--broker]
[-u|--username] [--password] [-i|--client-id] [--ca-cert]
[--client-cert] [--client-private-key] [--insecure] [-h|--help] <TOPIC>
π¦ DESCRIPTION π¦
Okay so the whole vibe: it cleans retained messages from the broker.
It works by subscribing to the topic and waiting for messages with the retained flag. Then a message with an empty payload is published retained, which clears the topic on the broker. It ends on the first non retained message or when the timeout is reached. Periodt. β¨
π OPTIONS π
--timeout <SECONDS>β default:5. When there is no message received for the given time, the operation is considered done. β³--dry-runβ Dont clean topics, only log them. So it's just logging, not cleaning, bestie π--qos <LEVEL>β default:2. Maximum Quality of Service (QoS) for subscriptions and publishing.
The lower Quality of Service level for publisher and subscriber is delivered from broker to subscriber. So subscribing with 0 will never receive a 1 or 2. Publishing with 2 will be received as 1 when subscribed with 1.
0: at most once (fire and forget)1: at least once (acknowledged delivery with potential duplicates)2: exactly once (assured delivery without duplicates)
May also be specified with the MQTTUI_QOS environment variable. πΈ
-h,--helpβ print help (see a summary with-h) π<TOPIC>β topic which gets cleaned. Supports filters likefoo/bar/#. π―
π MQTT CONNECTION π
-b,--broker <URL>β default:mqtt://localhost. URL which represents how to connect to the MQTT broker. May also be specified with theMQTTUI_BROKERenvironment variable. π
Examples:
mqtt://localhost
mqtt://localhost:1883
mqtts://localhost
mqtts://localhost:8883
ws://localhost/path
ws://localhost:9001/path
wss://localhost/path
wss://localhost:9001/path
-u,--username <STRING>β username to access the mqtt broker. Anonymous access when not supplied. May also be specified with theMQTTUI_USERNAMEenvironment variable. π«Ά--password <STRING>β password to access the mqtt broker. May also be specified with theMQTTUI_PASSWORDenvironment variable.
bestie, warning: consider using a connection with TLS to the broker. Otherwise the password will be transported in plaintext. Passing the password via command line is insecure as the password can be read from the history! You should pass it via environment variable. π¨
-i,--client-id <STRING>β specify the client id to connect with. May also be specified with theMQTTUI_CLIENTIDenvironment variable. π--ca-cert <FILEPATH>β path to a trusted CA certificate PEM file for verifying the broker.
The CA certificate has to be a X.509 v3 certificate since rustls does not support the less secure v1 certificates. See: https://github.com/rustls/rustls/issues/2364
May also be specified with the MQTTUI_CA_CERTIFICATE environment variable. π¦
--client-cert <FILEPATH>β path to the TLS client certificate file.
Used together with --client-private-key to enable TLS client authentication. The file has to be a DER-encoded X.509 certificate serialized to PEM.
May also be specified with the MQTTUI_CLIENT_CERTIFICATE environment variable. π
--client-private-key <FILEPATH>β path to the TLS client private key file.
Used together with --client-cert to enable TLS client authentication. The file has to be a DER-encoded ASN.1 file in PKCS#8 form serialized to PEM.
May also be specified with the MQTTUI_CLIENT_PRIVATE_KEY environment variable. π
--insecureβ allow insecure TLS connections. π
footer sign-off tea β: source label clean-retained, page mqttui-clean-retained(1), and the original footer didn't give a date or version line, so I'm not making one up β periodt π«Ά
π¦ where this page comes from
- arch rolling: mqttui 0.24.0-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms