Skip to content

"mc rm --force --recursive --versions --incomplete" not deleting incomplete uploads #5261

@sj14

Description

@sj14

Expected behavior

Deletion of all objects with all versions and all incomplete multipart uploads

Actual behavior

Incomplete multipart uploads are not removed.

A colleague did some testing:

svenja@machine:~$  mc rm --dry-run --force --recursive --versions nbg/svenja
DRYRUN: Removing `nbg/svenja/image.png` (versionId=null) (modTime=2025-11-12 13:19:12 UTC).

svenja@machine:~$ mc rm --dry-run --force --recursive --incomplete nbg/svenja
DRYRUN: Removing `nbg/svenja/ubuntu.1.iso`.
DRYRUN: Removing `nbg/svenja/ubuntu.2.iso`.
DRYRUN: Removing `nbg/svenja/ubuntu.3.iso`.

svenja@machine:~$ mc rm --dry-run --force --recursive --versions --incomplete nbg/svenja
DRYRUN: Removing `nbg/svenja/image.png` (versionId=null) (modTime=2025-11-12 13:19:12 UTC).

svenja@machine:~$ mc rm --dry-run --force --recursive --incomplete --versions nbg/svenja
DRYRUN: Removing `nbg/svenja/image.png` (versionId=null) (modTime=2025-11-12 13:19:12 UTC).

Steps to reproduce the behavior

Create a bucket with incomplete multipart uploads and execute mc rm --force --recursive --versions --incomplete.

mc --version

svenja@machine:~$ mc --version
mc version RELEASE.2024-06-29T19-08-46Z (commit-id=f5b325d9d399e09b4d21384081e397a52f6ca89d)
Runtime: go1.22.4 linux/amd64
Copyright (c) 2015-2024 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>

I had the same behavor (at least with mc rm --dry-run --force --recursive --versions --incomplete) and a newer version:

➜ mc --version
mc version RELEASE.2025-08-13T08-35-41Z (commit-id=7394ce0dd2a80935aded936b09fa12cbb3cb8096)
Runtime: go1.25.1 darwin/arm64
Copyright (c) 2015-2025 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions