Solved Dangers of pkg autoremove?

I have a FreeBSD 13.1p6 desktop machine, hostname defiant (if it matters, i7 with 32GB RAM), running a KDE desktop. I have been reading, and have seen more than one person state that doing a pkg autoremove is a good way to clean up crufty packages. In fact, I saw someone who said their process for system upgrades is:

Code:
freebsd-update fetch install
pkg update
pkg upgrade
pkg autoremove
pkg check -d -s -a
pkg audit -F -r
pkg clean -y

So the pkg upgrade upgraded, among other things the kde plasma desktop components from 5.27.1 to 5.27.2, however a pkg autoremove wants to remove those same plasma packages. In fact, on defiant, it wants to remove 315 packages. On my laptop, danube, on which I also run a kde desktop, it is only looking to remove 29 packages. Is there something wrong with defiant's package database or is routine pkg autoremove not a good idea, or perhaps something else is going on?

I have attached two text files, one for each host.

Thanks,
--vr
 

Attachments

Are you on quarterly or latest packages. This should rarely happen with quarterly. But as you did look for what pkg is doing. And stop if it is doing something weird, or something you do not want. And then try again in a couple of days. Many problem is fixed in a short time.
 
Never had a problem with pkg autoremove, either with quaterly or latest repository.
I have to admit that something is going wrong with your installations.

Normally, will be removed packages that depend of no other package and you don't have explicitly installed. How do you have installed plasma at the beginning? x11/plasma5-plasma maybe? Did you delete this metaport?
 
Use pkg prime-origins to see the "root" pkgs which you installed on the system. All other pkg/ports which doesn't depend reverse recursive to the prime origins are removed using pkg autoremove. If you wan't to preserve a pkg you can reinstall it on top of it using "-f" force which will add the pkg to the prime list.
 
Are you on quarterly or latest packages. This should rarely happen with quarterly. But as you did look for what pkg is doing. And stop if it is doing something weird, or something you do not want. And then try again in a couple of days. Many problem is fixed in a short time.

I am on latest. And I definitely don't do it if it is weird. In fact, I also, like with freebsd-update, create a snapshot of the system using bectl. I will gladly trade uptime for the ability to roll back if an upgrade goes sideways. :D

Never had a problem with pkg autoremove, either with quaterly or latest repository.
I have to admit that something is going wrong with your installations.

Normally, will be removed packages that depend of no other package and you don't have explicitly installed. How do you have installed plasma at the beginning? x11/plasma5-plasma maybe? Did you delete this metaport?
I installed kde5, the base package via pkg, and then went through the rest. I found a few in the list which needed to stay, e.g. dmidecode and vlc, which I added via pkg set -A0. The rest I ended up purging. Apparently, pkg autoremove works best when done regularly, instead allowing a layer of cruft to build up...Which is what I did over the course of years. :)

Thanks to everyone for your helpful responses...
--vr
 
Back
Top