#!/bin/bash # there's probably an easier way to do this in Debian, already # but since I don't know that way, this will purge the configuration # files of packages that were removed but left configs laying around cols=${COLUMNS} export COLUMNS=180 test=$(dpkg -l | awk '{if ($1=="rc"){print $2}}') for n in ${test} do dpkg --purge ${n} done export COLUMNS=${cols}