Hi,
Is there a way to invert a match when upgrading? Since I've started
using pkgbase I find myself wanting to upgrade only non-base packages
and I haven't found a quick way to do it. It would be great to have
an option to invert -g or -x matches.
Thanks,
Nikos
Hi.
Temat: pkg upgrade with inverting match?
Data: 2026-03-19 10:34
Nadawca: "Nikos Vassiliadis" <nvass@gmx.com>
Adresat: freebsd-stable@FreeBSD.org;
Hi vermaden,Hi,
Is there a way to invert a match when upgrading? Since I've started
using pkgbase I find myself wanting to upgrade only non-base packages
and I haven't found a quick way to do it. It would be great to have
an option to invert -g or -x matches.
Thanks,
Nikos
You can upgrade only with specified 'FreeBSD-ports' and 'FreeBSD-ports-kmods' repos:
root@freebsd15:~ # pkg upg -r FreeBSD-ports -r FreeBSD-ports-kmods
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
FreeBSD-ports, FreeBSD-ports-kmods are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
So PKGBASE 'Base System' will not be upgraded because its in the 'FreeBSD-base' repo.
On 3/19/26 12:14, vermaden wrote:
You can upgrade only with specified 'FreeBSD-ports' and 'FreeBSD-
ports-kmods' repos:
root@freebsd15:~ # pkg upg -r FreeBSD-ports -r FreeBSD-ports-kmods
Hi vermaden,
Oh yes, that does what I asked for. Thank you!
For completeness reasons I think it would be nice to add an option to
pkg to invert matches. Maybe it should invert -r as well!
On 19/03/2026 11:35, Nikos Vassiliadis wrote:The "pkg" command allows you to define aliases in pkg.conf. So, if you wanted to save on typing, you could, say, define "base-upgrade" and "ports-upgrade" aliases to restrict "pkg upgrade" to just the appropriate repositories.
On 3/19/26 12:14, vermaden wrote:
[..]
You can upgrade only with specified 'FreeBSD-ports' and 'FreeBSD- ports-kmods' repos:
root@freebsd15:~ # pkg upg -r FreeBSD-ports -r FreeBSD-ports-kmods
[..]
Hi vermaden,
Oh yes, that does what I asked for. Thank you!
For completeness reasons I think it would be nice to add an option to
pkg to invert matches. Maybe it should invert -r as well!
First and most important (at least for me) would be a clear separation of base system upgrades from 3rd packages, without having to enter 40-character-long arguments.
On Mar 19, 2026, at 9:42rC>AM, Paul Mather <paul@gromit.dlib.vt.edu> wrote:
On Mar 19, 2026, at 7:29rC>am, Miroslav Lachman <000.fbsd@quip.cz> wrote:
On 19/03/2026 11:35, Nikos Vassiliadis wrote:
On 3/19/26 12:14, vermaden wrote:
[..]
You can upgrade only with specified 'FreeBSD-ports' and 'FreeBSD- ports-kmods' repos:
root@freebsd15:~ # pkg upg -r FreeBSD-ports -r FreeBSD-ports-kmods
[..]
Hi vermaden,
Oh yes, that does what I asked for. Thank you!
For completeness reasons I think it would be nice to add an option to
pkg to invert matches. Maybe it should invert -r as well!
First and most important (at least for me) would be a clear separation of base system upgrades from 3rd packages, without having to enter 40-character-long arguments.
The "pkg" command allows you to define aliases in pkg.conf. So, if you wanted to save on typing, you could, say, define "base-upgrade" and "ports-upgrade" aliases to restrict "pkg upgrade" to just the appropriate repositories.Since this is one of the biggest changes to the upgrade system since the OS was introduced, it might save those answering questions on the mailing lists and forums to put some useful aliases in the stock pkg.conf to deal with this. Similar with having this openly documented somewhere as opposed to people just grunting that "you know pkg can handle multiple repos (even though 99% of users out there have likely never had a need to switch repos when invoking pkg)".
Cheers,--
Paul.
Since this is one of the biggest changes to the upgrade system since the OS was introduced, it might save those answering questions on the mailing lists and forums to put some useful aliases in the stock pkg.conf to deal with this. Similar with having this openly documented somewhere as opposed to people just grunting that "you know pkg can handle multiple repos (even though 99% of users out there have likely never had a need to switch repos when invoking pkg)".
On 19/03/2026 14:42, Paul Mather wrote:\begin{sarcasm}
On Mar 19, 2026, at 7:29rC>am, Miroslav Lachman <000.fbsd@quip.cz> wrote:
[...]
First and most important (at least for me) would be a clear separation of base system upgrades from 3rd packages, without having to enter 40-character-long arguments.The "pkg" command allows you to define aliases in pkg.conf. So, if you wanted to save on typing, you could, say, define "base-upgrade" and "ports-upgrade" aliases to restrict "pkg upgrade" to just the appropriate repositories.
Yes, and everyone will fix it locally, each in their own way, so every computer will have a different command to achieve the same result. What an amazing time we live in.
I still don't think it's a good idea to combine base system updates and package upgrades into a single command by default. Now even something as simple as patch level security base update can completely break user's desktop if package upgrade runs at the same time and the repository happens to be missing such important packages as Firefox, Thunderbird, KDE / Plasma, etc.In my experience, that happened before pkgbase. Having reliable update and rollback procedures is important.
(missing packages that pkg upgrade then uninstalls from the local machine rCo I see this problem far too often)
On 3/19/26 12:14, vermaden wrote:
Hi.
Temat: pkg upgrade with inverting match?
Data: 2026-03-19 10:34
Nadawca: "Nikos Vassiliadis" <nvass@gmx.com>
Adresat: freebsd-stable@FreeBSD.org;
Hi,
Is there a way to invert a match when upgrading? Since I've started
using pkgbase I find myself wanting to upgrade only non-base packages
and I haven't found a quick way to do it. It would be great to have
an option to invert -g or -x matches.
Thanks,
Nikos
You can upgrade only with specified 'FreeBSD-ports' and 'FreeBSD-
ports-kmods' repos:
root@freebsd15:~ # pkg upg -r FreeBSD-ports -r FreeBSD-ports-kmods
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
FreeBSD-ports, FreeBSD-ports-kmods are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
So PKGBASE 'Base System' will not be upgraded because its in the
'FreeBSD-base' repo.
Hi vermaden,
Oh yes, that does what I asked for. Thank you!
For completeness reasons I think it would be nice to add an option to
pkg to invert matches. Maybe it should invert -r as well!
Regards,
Nikos
I was proposing the same idea since long time ago:On 19/03/2026 14:42, Paul Mather wrote:
On Mar 19, 2026, at 7:29rC>am, Miroslav Lachman <000.fbsd@quip.cz>
wrote:
[...]
First and most important (at least for me) would be a clear
separation of base system upgrades from 3rd packages,
without having to enter 40-character-long arguments.
The "pkg" command allows you to define aliases in pkg.conf.
So, if you wanted to save on typing, you could, say, define
"base-upgrade" and "ports-upgrade" aliases to restrict
"pkg upgrade" to just the appropriate repositories.
Yes, and everyone will fix it locally, each in their own way,
so every computer will have a different command to achieve
the same result. What an amazing time we live in.
I still don't think it's a good idea to combine base system
updates and package upgrades into a single command by
default. Now even something as simple as patch level
security base update can completely break user's desktop
if package upgrade runs at the same time and repository
happens to be missing such important packages as Firefox,
Thunderbird, KDE / Plasma, etc.
(missing packages that pkg upgrade then uninstalls from
the local machine rCo I see this problem far too often)
Kind regards
Miroslav Lachman
Temat: Re: pkg upgrade with inverting match?p.cz>
Data: 2026-03-19 17:41
Nadawca: "Miroslav Lachman" <000.fbsd@quip.cz>
Adresat: "Paul Mather" <paul@gromit.dlib.vt.edu>;
DW: "Nikos Vassiliadis" <nvass@gmx.com>; "vermaden" & lt;vermaden@interia.pl>; "freebsd-stable@FreeBSD.org" <freebsd-stable@FreeBSD.org>;
On 19/03/2026 14:42, Paul Mather wrote:
On Mar 19, 2026, at 7:29=E2=80=AFam, Miroslav Lachman <000.fbsd@qui=
wrote:
[...]
First and most important (at least for me) would be a clear
separation of base system upgrades from 3rd packages,
without having to enter 40-character-long arguments.
The "pkg" command allows you to define aliases in pkg.conf.
So, if you wanted to save on typing, you could, say, define
"base-upgrade" and "ports-upgrade" aliases to restrict
"pkg upgrade" to just the appropriate repositories.
Yes, and everyone will fix it locally, each in their own way,
so every computer will have a different command to achieve
the same result. What an amazing time we live in.
I still don't think it's a good idea to combine base system
updates and package upgrades into a single command by
default. Now even something as simple as patch level
security base update can completely break user's desktop
if package upgrade runs at the same time and repository
happens to be missing such important packages as Firefox,
Thunderbird, KDE / Plasma, etc.
(missing packages that pkg upgrade then uninstalls from
the local machine =E2=80=94 I see this problem far too often)
Kind regards
Miroslav Lachman
I was proposing the same idea since long time ago:
1.
Separate pkgbase(8) command that will only manipulate
FreeBSD 'Base System' and with SQLite database in the
/var/db/pkgbase/ directory.
2.
Separate pkg(8) command that will only manipulate
FreeBSD '3rd Party Software' and with SQLite database in
the /var/db/pkg/ directory.
... but seems that is just not wanted.
Regards,
vermaden
I was proposing the same idea since long time ago:
1.
Separate pkgbase(8) command that will only manipulate
FreeBSD 'Base System' and with SQLite database in the
/var/db/pkgbase/ directory.
2.
Separate pkg(8) command that will only manipulate
FreeBSD '3rd Party Software' and with SQLite database in
the /var/db/pkg/ directory.
... but seems that is just not wanted.
Regards,
vermaden
On Mar 19, 2026, at 6:21rC>PM, vermaden <vermaden@interia.pl> wrote:
Temat: Re: pkg upgrade with inverting match?
Data: 2026-03-19 17:41
Nadawca: "Miroslav Lachman" <000.fbsd@quip.cz>
Adresat: "Paul Mather" <paul@gromit.dlib.vt.edu>;
DW: "Nikos Vassiliadis" <nvass@gmx.com>; "vermaden" <vermaden@interia.pl>; "freebsd-stable@FreeBSD.org" <freebsd-stable@FreeBSD.org>;
On 19/03/2026 14:42, Paul Mather wrote:
On Mar 19, 2026, at 7:29rC>am, Miroslav Lachman <000.fbsd@quip.cz>
wrote:
[...]
First and most important (at least for me) would be a clear
separation of base system upgrades from 3rd packages,
without having to enter 40-character-long arguments.
The "pkg" command allows you to define aliases in pkg.conf.
So, if you wanted to save on typing, you could, say, define
"base-upgrade" and "ports-upgrade" aliases to restrict
"pkg upgrade" to just the appropriate repositories.
Yes, and everyone will fix it locally, each in their own way,
so every computer will have a different command to achieve
the same result. What an amazing time we live in.
I still don't think it's a good idea to combine base system
updates and package upgrades into a single command by
default. Now even something as simple as patch level
security base update can completely break user's desktop
if package upgrade runs at the same time and repository
happens to be missing such important packages as Firefox,
Thunderbird, KDE / Plasma, etc.
(missing packages that pkg upgrade then uninstalls from
the local machine rCo I see this problem far too often)
Kind regards
Miroslav Lachman
I was proposing the same idea since long time ago:This sort of thing is perfect.
1.
Separate pkgbase(8) command that will only manipulate
FreeBSD 'Base System' and with SQLite database in the
/var/db/pkgbase/ directory.
2.
Separate pkg(8) command that will only manipulate
FreeBSD '3rd Party Software' and with SQLite database in
the /var/db/pkg/ directory.
... but seems that is just not wanted.
Regards,
vermaden
Another thing I enjoy about freebsd-update is
the auto-snapshot if you're running zfs on root,
I assume that goes away with pkgbase?
(please, nobody tell me I can just snapshot it myself)
Charles
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 14:34:17 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (18,532K bytes) |
| Messages: | 265,533 |