Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

[HowTo] reset a package to its default config

$
0
0
This might be helpful for some folks - I've only had to use it once because I always back up configs before I edit them but if you've ever got a broken package and want to reset the package to its default config it's easy to do with a oneliner - as root:

Code:

apt-get -o Dpkg::Options::='--force-confnew' install --reinstall <package-name>
Not necessary to reset a single package but since I don't particularly want to look up this command in the middle of breakage I made a bash function out of it and stuck it in ~/.profile. Looks like this:

Code:

reconfig() {    if [[ -z "$1" ]]; then        echo "Usage: reconfig <package-name>"        return 1    fi    sudo apt-get -o Dpkg::Options::='--force-confnew' install --reinstall "$1"}

Statistics: Posted by wizard10000 — 2025-01-06 11:12 — Replies 0 — Views 32



Viewing all articles
Browse latest Browse all 3474

Trending Articles