Autoremove options for 'pkg delete'
From Kris Moore's talk @BSDCan
Can we have an option that shows what could be autoremoved as a consequence of running
pkg delete pkgname
Probably something like:
pkg delete -A pkgname
which would do the package deletion as usual, and then run autoremove, including asking for user confirmation on what to remove.
I'm sure I missed the idea.
But what a difference with pkg delete -n pkgname, since solver will remove all depends recursive on pkgname?
On 14/06/2015 04:04, Andrej Z. wrote:
I'm sure I missed the idea. But what a difference with
pkg delete -n pkgname, since solver will remove all depends recursive onpkgname?
Solver will remove anything that depends on pkgname if you 'pkg delete pkgname' (ie. it deletes the children of pkgname)
This is the other way round: it deletes anything pkgname depends on which is marked automatic and that nothing else depends on (ie. it deletes from amongst the parents of pkgname).
Matthew
This is a great idea and I often miss the functionality. Especially, when trying to find the most suitable software among several options. It's not intuitive that installing package X also means installing of all its missing dependencies, but after (almost immediately) uninstalling X those dependencies will remain.
Isn't it just the same as pkg remove foo && pkg autoremove?
Isn't it just the same as
pkg remove foo && pkg autoremove?
Yes, it is. Similarly to how sort -u acts the same as sort | uniq and to other convenience options and shortcuts.
After a bit of thinking, no it isn't. Imagine we already have some auto packages that can be removed by autoremove. If we run pkg delete -A pkgname it will autoremove both newly introduced to-be-autoremoved packages as well as previous ones.
Indeed. Very good point.
I never said anything here, but yes this is a welcomed feature.