Prioritizing System Services with Systemd - Run a Process Permanently in the Background

If you simply want to adjust some priorities, here is how to do it in three steps.
  1. sudo systemctl edit [service]
  2. sudo systemctl daemon-reload
  3. sudo systemctl restart [service]

Removing all images with rkt

Note this will remove all images, not just stale ones. Set rkt to point to your rkt binary.

#!/bin/sh
rkt="./rkt/rkt"
images="$(sudo $rkt image list | awk 'NR>1 {print $1}')"
set -x
sudo $rkt gc --grace-period=1s
sleep 1
sudo $rkt gc --grace-period=1s
sudo $rkt image list
sudo $rkt image rm $images