Docker docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rm docker images | grep '^<none>' | awk '{print $3}' | xargs docker rmi Rails rm -rf logs/*.logs