Skip to content

Instantly share code, notes, and snippets.

@dchernokur
dchernokur / rd-clean.sh
Created November 12, 2015 10:52 — forked from unicolet/rd-clean.sh
Shell script to purge Rundeck execution history
#!/bin/sh
# setup ~/.pgpass to allow passwordless connection to postgres
# keep last 30 executions for each job
KEEP=30
cd /var/lib/rundeck/logs/rundeck
JOBS=`find . -maxdepth 3 -path "*/job/*" -type d`