Solved Components installed with package base

I have converted my existing system of 14.2-RELEASE to package base system. I did update to 14.4-RELEASE also. This is working properly and the conversion was smooth following the wiki. But there are now all the components of 'dbg', 'dev' and 'lib32' packages. These were not selected in the original installation. I tried to delete those with pkg delete -x *lib32*. But it failed. Please help me with the right command. It would be better to have choice for deselecting components for general users.
 
It is working as pkg inf -x lib32 but not for delete. I may try with transferring to a file and use. Probably 15.1-RELEASE will be good for testing. Thanks.
 
First, I suggest you use -n (dry run) to see what will be happening.
pkg delete -x *lib32*
You are mixing a shell interpretation of wildcards (the *) and pkg regex interpretation (using -x), don't do that. Especially when using -x put the regex in the proper quotes: single quotes[1]; this ensures that a correct regex expression (that means using .* instead of *) is passed, as-is, to pkg. A similar (old) example on my system:
Rich (BB code):
[1-0] # pkg del -n -x '.*ibv.*'
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 15 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        ffmpeg: 6.1.2_17,1
        firefox-esr: 140.5.0,2
        libv4l: 1.23.0_5
        libva: 2.22.0_1
        libva-intel-media-driver: 23.4.3_1
        libva-utils: 2.22.0
        libva-vdpau-driver: 0.7.4_10
        libvdpau: 1.5
        libvdpau-va-gl: 0.4.2_5
        libvncserver: 0.9.15
        libvorbis: 1.3.7_2,3
        libvpx: 1.15.2
        scrcpy: 3.3.3
        vdpauinfo: 1.5
        virtualbox-ose-71: 7.1.14

Number of packages to be removed: 15

The operation will free 1 GiB.

Added:
It is working as pkg inf -x lib32 but not for delete.
The difference between using pkg-info(8) and pkg-delete(8) is probably, in part, caused by the fact that pkg delete will take dependancies into account when deleting packages. So, not every package that it wants to delete is solely the result of evaluating the regex that it is passed on the command line.

___
[1] only use double quotes when you need a shell variable evaluated inside the regex, that is not the case in your example.
 
if you want to delete lib32 packages, just use pkg delete '*-lib32'. no need to mess with REs.

also, note that upgrading from 14 to 15 with pkgbase is not supported. it will probably work, but you may run into some issues that require manual intervention. at the least, you should install FreeBSD-set-minimal after upgrading. it would have been better to upgrade to 15 first (edit: using freebsd-update), then run pkgbasify, which is what the supported pkgbase conversion path will be.
 
pkg delete '*-lib32'. no need to mess with REs
Yes it is working fine with the correct syntax pkg delete -n '*-dev' and for pkg info '*-dev' but not for '*lib32'. Learned in a hard way, as the base/FreeBSD-clibs-lib32 brings all the dependency as below
Code:
$ pkg del -n '*-lib32'|less
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 26 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        FreeBSD-clibs-lib32: 14.4p4
        Imath: 3.2.2_3
        ffmpeg: 8.1,1
        firefox: 150.0.1,2
        gcc14: 14.2.0_4
        imlib2: 1.12.6,2
        libheif: 1.21.2_3
        libjxl: 0.11.2
        llvm19: 19.1.7_1
        mesa-dri: 24.1.7_11
        mpv: 0.41.0_1,1
        openblas: 0.3.30,2
        openbox: 3.6_14
        openexr: 3.4.11
        py311-numpy1: 1.26.4_3
        spirv-llvm-translator-llvm19: 19.1.18
        tint2: 17.0.2
        xf86-input-keyboard: 1.9.0_6
        xf86-input-libinput: 1.3.0_1
        xf86-input-mouse: 1.9.3_5
        xf86-input-synaptics: 1.9.1_11
        xf86-video-scfb: 0.0.7_2
        xf86-video-vesa: 2.6.0
        xorg: 7.7_3
        xorg-drivers: 7.7_7
I have restored my system and get rid of 'dev' packages by pkg delete '*-dev'. I shall use your pointer for 15.1-BETA2 in using the 'set' system.
 
Back
Top