BUPSTASH-RM(1)
π BUPSTASH-RM β like, the remove command, bestie
Okay so this is from the General Commands Manual, it's BUPSTASH-RM(1), and it's literally the glow-up-and-get-gone command for your bupstash repo. Sit down, grab a boba, and let's get into it π§β¨
β¨ SYNOPSIS β¨
Remove items from a bupstash repository.
bupstash rm [OPTIONS] QUERY...
πΈ DESCRIPTION πΈ
bupstash rm removes items from a bupstash repository. That's the whole vibe ok π
But here's the tea: items that are removed are not immediately deleted. Nope. The deletion and the space reclamation are scheduled for the next time the garbage collector bupstash-gc(1) runs. So think of it like "I unfollowed them but the stories still show up until the app refreshes." Iconic, honestly.
And the best part? Only the metadata needs to be decrypted to remove items, so a metadata key is sufficient for item deletion β even if you don't have access to the data decryption key. Security slay ππ
π¦ QUERY LANGUAGE π¦
For the full documentation on the query language, go check bupstash-query-language(7) β she's the main character of that page.
π Remove query examples π
$ id=$(bupstash put ./some-data)
$ bupstash rm id=$id
$ bupstash rm name=backups.tar
$ bupstash rm --allow-many name='*.tar' and older-than 30d
$ bupstash rm --allow-many id="*"
Note the --allow-many on the ones that catch more than one item β that flag is doing heavy lifting, bestie ποΈββοΈ
π QUERY CACHING π
The rm command uses the same query caching mechanisms as bupstash-list(1) β check that page for more info on the query cache. Shared queen behavior ππ«
π₯ OPTIONS π₯
-r,--repository REPOβ the repository to connect to. May be of the formssh://$SERVER/$PATHfor remote repositories, but only if ssh access is configured. If you don't specify it, it's set toBUPSTASH_REPOSITORY. π-k,--key KEYβ the key used to decrypt metadata when executing a query. If it's not set, it defaults toBUPSTASH_KEY. π--query-cache PATHβ path to the query-cache file. Defaults to one of the following, in order, provided the appropriate environment variables are set:$BUPSTASH_QUERY_CACHE,$XDG_CACHE_HOME/.cache/bupstash/bupstash.qcacheor$HOME/.cache/bupstash/bupstash.qcache. Chaotic fallback energy but it works π--query-encryptedβ the query will not decrypt any metadata, letting you list items you do not have a decryption key for. This option inserts the pseudo query tag'decryption-key-id'. Sneaky and useful π΅οΈββοΈ--ids-from-stdinβ remove items with IDs read from stdin, one per line, instead of executing a query. Pipe girlies rise π«Ά--allow-manyβ by defaultbupstashrefuses to remove multiple items from a single query, and this flag disables that safety feature. β οΈ It's literally a guardrail and you're removing it, so like, be intentional fr fr.--utc-timestampsβ display and search against timestamps in utc time instead of local time. Timezone girlies stay winning π--no-progressβ suppress progress indicators (progress indicators are also suppressed when stderr is not an interactive terminal, so it does this automatically, no cap).-q,--quietβ be quiet, implies--no-progress. Shhh π€«
πΌ ENVIRONMENT πΌ
BUPSTASH_REPOSITORYβ the repository to connect to. May be of the formssh://$SERVER/$PATHfor remote repositories if ssh access is configured.BUPSTASH_REPOSITORY_COMMANDβ a command to run to connect to an instance ofbupstash-serve(1). This allows more complex connections to the repository for less common use cases. Fancy πBUPSTASH_KEYβ path to a primary key that will be used for decrypting data and metadata.BUPSTASH_KEY_COMMANDβ a command to run that must print the key data; can be used instead ofBUPSTASH_KEYto fetch the key from arbitrary locations such as the network or other secret storage. So extra, so valid πBUPSTASH_QUERY_CACHEβ path to the query cache file to use.
π EXAMPLES π
remove an item with a specific id from the repository
$ bupstash rm id=14ebd2073b258b1f55c5bbc889c49db4
remove all items from the respository
$ bupstash rm id="*"
β οΈ Yes, that's all of them. The * is not joking around. Also yes, "respository" is spelled like that in the original and I'm not about to gaslight you about it π
remove items with name backup.tar that are older than 30 days
$ bupstash rm name=backup.tar and older-than 30d
remove items with a custom script
$ bupstash list --format=jsonl1 \
| custom-json-filter \
| bupstash rm --ids-from-stdin
Pipeline realness π β bupstash list feeds custom-json-filter feeds bupstash rm --ids-from-stdin, and honestly? Chef's kiss.
β SEE ALSO β
bupstash(1), bupstash-list(1), bupstash-gc(1), bupstash-query-language(7)
Go read bupstash-gc(1) if you actually want that space back btw β rm just schedules the deletion, remember? ππ«Ά
okay that's the whole page, you're officially a bupstash rm expert, periodt π This little gem is dated May 2025 and lives in the bupstash source, BUPSTASH-RM(1). Go forth and remove responsibly, bestie πβ¨
π¦ where this page comes from
- alpine 3.24: bupstash-doc 0.12.0-r7 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms