diff --git a/home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl b/home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl index 3e5349fd..0de8367e 100644 --- a/home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl +++ b/home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl @@ -13,7 +13,7 @@ for PKG in {{ $removePackages }}; do sudo apk delete "$PKG" fi elif command -v apt-get > /dev/null; then - if dpkg -l "$PKG" | grep "$PKG" 2>&1 /dev/null; then + if dpkg -l "$PKG" | grep -E '^ii' /dev/null; then sudo apt-get remove -y "$PKG" logg success 'Removed `'"$PKG"'` via apt-get' fi