diff --git a/src/internal/config.rs b/src/internal/config.rs index e0d599e..277352b 100644 --- a/src/internal/config.rs +++ b/src/internal/config.rs @@ -17,8 +17,6 @@ pub struct Config { #[derive(Debug, Deserialize, Serialize)] pub struct ConfigBase { pub pacdiff_warn: bool, - pub paccache_keep: i32, - pub paccache_keep_ins_pkgs: bool, } #[derive(Debug, Deserialize, Serialize, Default)] @@ -34,11 +32,7 @@ pub struct ConfigBin { impl Default for ConfigBase { fn default() -> Self { - Self { - pacdiff_warn: true, - paccache_keep: 0, - paccache_keep_ins_pkgs: true, - } + Self { pacdiff_warn: true } } } diff --git a/src/operations/clean.rs b/src/operations/clean.rs index 2c5f92f..85858a8 100644 --- a/src/operations/clean.rs +++ b/src/operations/clean.rs @@ -83,14 +83,12 @@ pub async fn clean(options: Options) { let clear_pacman_cache = noconfirm || prompt!(default no, "Also clear pacman's package cache?"); if clear_pacman_cache { - let conf = Config::read(); - // Clear pacman's cache - // keeps 0 versions of the package in the cache by default - // keeps installed packages in the cache by default + // keeps 3 versions of the package in the cache + // keeps installed packages in the cache let result = PaccacheBuilder::default() - .set_keep(conf.base.paccache_keep) - .keep_ins_pkgs(conf.base.paccache_keep_ins_pkgs) + .set_keep(3) + .keep_ins_pkgs(true) .quiet_output(quiet) .remove() .await;