Slackbot
06/08/2023, 6:33 PMramindk
06/08/2023, 6:42 PMensure => purge, which will remove the package and any deps that it pulled in that aren't in use by other packages.ramindk
06/08/2023, 6:44 PMCode_Bleu
06/08/2023, 6:44 PMCode_Bleu
06/08/2023, 6:49 PMnode 'puppet.puppetlab.local' {
package { 'nginx':
ensure => 'purge',
}
}Code_Bleu
06/08/2023, 6:54 PMensure => 'purge'vchepkov
06/08/2023, 6:56 PMpurgedCode_Bleu
06/08/2023, 6:57 PMCode_Bleu
06/08/2023, 6:57 PMabsent it will just remove the bottom one, but not the restvchepkov
06/08/2023, 6:58 PMvchepkov
06/08/2023, 6:58 PMCode_Bleu
06/08/2023, 6:58 PMCode_Bleu
06/08/2023, 6:59 PMapt and the autoremove would be the option....but how to call that with pupet?vchepkov
06/08/2023, 7:00 PMvchepkov
06/08/2023, 7:01 PMexec { "remove-leafes"
command => "apt-get -y autoremove",
refreshonly => true,
}
You can notify exec ?Code_Bleu
06/08/2023, 7:01 PMstable message is just be grepping from apt list that's itCode_Bleu
06/08/2023, 7:02 PMexec method too, but had other issues. I'll try again in a min though.ramindk
06/08/2023, 7:04 PMnginx pull in nginx-core or some such and that package actually has the deps. purging ngnix by itself likely doesn't go deep enough.ramindk
06/08/2023, 7:07 PMensure => absent, when you remove a package.ramindk
06/08/2023, 7:08 PMCode_Bleu
06/08/2023, 7:09 PM