Re: How to reinstall *ALL* pkgs
- Reply: Edward Sanford Sutton, III: "Re: How to reinstall *ALL* pkgs"
- In reply to: paul beard : "Re: How to reinstall *ALL* pkgs"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Oct 2023 16:01:48 UTC
On Tue, 17 Oct 2023, at 04:14, paul beard wrote: > I have done something like this… > ls /var/db/pkg/ | sed -r 's/(.*)-[0-9]/\1\ /g' | cut -f1 -d" " > > and pass that to pkg or to a file to clean it up (the sqlite databases > are in there and don't need installing via pkg). I use this to track only the leaf packages, what's explicitly been installed and the others will be pulled in automatically. NB make sure you're in the root /bin/sh & a console, not an (x)term as this will remove *all* packages, including xorg window manager, preferred shell etc. # pkg prime-origins | sort | uniq > /etc/packages.lst ### edit and amend as required ### force-delete all existing packages, rebootstrap & install # pkg delete -fy \* # pkg bootstrap -f # pkg install -r FreeBSD `cat /etc/packages.lst` A+ Dave