Dangerous helpers
Opt-in: destructive helpers. Each one shows targets and asks for a phrase.
Enable only for maintenance: ALIASX_ENABLE="dangerous"
Not loaded by default. Enable: export ALIASX_ENABLE="dangerous"
General
| Name | Runs | What it does | |
|---|---|---|---|
confirm PROMPT PHRASE | true only if user types PHRASEexample$ confirm 'Wipe cache?' WIPE && rm -r cache
Wipe cache? Type WIPE to continue: WIPE |
Docker
| Name | Runs | What it does | |
|---|---|---|---|
docker-rm-stopped | remove all exited containersexample$ docker-rm-stopped
CONTAINER ID STATUS
9a1b... Exited (0)
Remove every stopped container? Type REMOVE-STOPPED to continue: | ||
docker-prune-all | remove all unused data including imagesexample$ docker-prune-all
Remove all unused Docker data, including images? Type PRUNE-DOCKER to continue: |
Databases
| Name | Runs | What it does | |
|---|---|---|---|
redis-flush | delete every key in the current Redis databaseexample$ redis-flush
(integer) 1520
Delete every key in this Redis database? Type FLUSH-REDIS to continue: | ||
pg-dropdb DB | drop a PostgreSQL database (type its name to confirm)example$ pg-dropdb shop_copy
Drop database shop_copy permanently? Type shop_copy to continue: |