pkg icon indicating copy to clipboard operation
pkg copied to clipboard

pkg remove -R has no effect with -f

Open arrowd opened this issue 2 years ago • 2 comments

By default pkg remove performs recursive deletion as if -R was passed to the command. It gets disabled if -f is passed. However, passing -fR does not re-enable recursive removing despite the comment:

	/*
	 * By default delete packages recursively.
	 * If force mode is enabled then we try to remove packages non-recursively.
	 * However, if -f and -R flags are both enabled then we return to
	 * recursive deletion.
	 */
	if (!force || recursive_flag)
		f |= PKG_FLAG_RECURSIVE;
% pkg remove tiff
...

Installed packages to be REMOVED:
        PackageKit: 1.2.6_1
        adwaita-icon-theme: 40.1.1_1
        colord: 1.4.6
        gdk-pixbuf2: 2.42.10
        geoclue: 2.5.7
        gtk-update-icon-cache: 3.24.31
        gtk3: 3.24.34_1
        lcms2: 2.13.1
        libnotify: 0.8.2
        librsvg2-rust: 2.54.5_6
        tiff: 4.4.0_1

Number of packages to be removed: 11

% pkg remove -f tiff
...

Installed packages to be REMOVED:
        tiff: 4.4.0_1

Number of packages to be removed: 1

% pkg remove -fR tiff
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        tiff: 4.4.0_1

Number of packages to be removed: 1

arrowd avatar Mar 28 '23 06:03 arrowd

I could put this in the manual?

concussious avatar Jul 10 '25 23:07 concussious

The issue I described should be fixed in the code.

arrowd avatar Jul 11 '25 05:07 arrowd