Remove unused rendered machine configs
You can remove unused rendered machine configs by using the oc adm prune renderedmachineconfigs command with the --confirm command, reducing disk space and performance issues.
If any rendered machine config is not deleted, the command output indicates which was not deleted and lists the reason for skipping the deletion.
-
Optional: List the rendered machine configs that you can remove automatically by running the following command. Any rendered machine config marked with the
as it’s currently in usemessage in the command output cannot be removed.$ oc adm prune renderedmachineconfigs --pool-name=workerExample outputDry run enabled - no modifications will be made. Add --confirm to remove rendered machine configs. dry-run deleting rendered MachineConfig rendered-worker-f38bf61ced3c920cf5a29a200ed43243 dry-run deleting MachineConfig rendered-worker-fc94397dc7c43808c7014683c208956e Skip dry-run deleting rendered MachineConfig rendered-worker-708c652868f7597eaa1e2622edc366ef as it's currently in usewhere:
- pool-name
-
Optional: Specifies the machine config pool where you want to delete the machine configs from.
-
Remove the unused rendered machine configs by running the following command. The command in the following procedure would delete the two oldest unused rendered machine configs in the
workermachine config pool.$ oc adm prune renderedmachineconfigs --pool-name=worker --count=2 --confirmwhere:
--count-
Optional: Specifies the maximum number of unused rendered machine configs you want to delete, starting with the oldest.
--confirm-
Indicates that pruning should occur, instead of performing a dry-run.
--pool-name-
Optional: Specifies the machine config pool from which you want to delete the machine. If not specified, all the pools are evaluated.
Example outputdeleting rendered MachineConfig rendered-worker-f38bf61ced3c920cf5a29a200ed43243 deleting rendered MachineConfig rendered-worker-fc94397dc7c43808c7014683c208956e Skip deleting rendered MachineConfig rendered-worker-708c652868f7597eaa1e2622edc366ef as it's currently in use