Date: Tue, 17 Oct 2023 16:01:48 +0000 From: "Dave Cottlehuber" <dch@skunkwerks.at> To: "Paul Beard" <paulbeard@gmail.com>, "Aryeh Friedman" <aryeh.friedman@gmail.com> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: How to reinstall *ALL* pkgs Message-ID: <39b235c6-a8f1-4383-b491-24b32eed2b7d@app.fastmail.com> In-Reply-To: <CAMtcK2o1Hxx7DxP-4fqWdw3MQrFq5A7W-MO4mcL3PR0ES6qQXg@mail.gmail.com> References: <CAGBxaX=utxjVf7w-2=iSrhoDvy%2BrC1PCVPY8RSWu8CzXOf70ng@mail.gmail.com> <CAMtcK2o1Hxx7DxP-4fqWdw3MQrFq5A7W-MO4mcL3PR0ES6qQXg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Oct 2023, at 04:14, paul beard wrote: > I have done something like this=E2=80=A6 > ls /var/db/pkg/ | sed -r 's/(.*)-[0-9]/\1\ /g' | cut -f1 -d" " =20 > > and pass that to pkg or to a file to clean it up (the sqlite databases=20 > are in there and don't need installing via pkg).=20 I use this to track only the leaf packages, what's explicitly been insta= lled 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39b235c6-a8f1-4383-b491-24b32eed2b7d>