diff --git a/cmd/neofs-cli/modules/object/util.go b/cmd/neofs-cli/modules/object/util.go index 879261b0b..1ff2a4f06 100644 --- a/cmd/neofs-cli/modules/object/util.go +++ b/cmd/neofs-cli/modules/object/util.go @@ -208,6 +208,12 @@ func ReadOrOpenSessionViaClient(cmd *cobra.Command, dst SessionPrm, cli *client. var objs []oid.ID if obj != nil { objs = []oid.ID{*obj} + + if _, ok := dst.(*internal.DeleteObjectPrm); ok { + common.PrintVerbose("Collecting relatives of the removal object...") + + objs = append(objs, collectObjectRelatives(cmd, cli, cnr, *obj)...) + } } finalizeSession(cmd, dst, tok, key, cnr, objs...)