package cli

import (
	"context"

	"github.com/pkg/errors"

	"github.com/kopia/kopia/repo"
	"github.com/kopia/kopia/repo/blob"
)

var (
	blobDeleteCommand = blobCommands.Command("delete", "Delete blobs by ID").Alias("rm")
	blobDeleteBlobIDs = blobDeleteCommand.Arg("blobIDs", "Blob IDs").Required().Strings()
)

func runDeleteBlobs(ctx context.Context, rep *repo.Repository) error {
	for _, b := range *blobDeleteBlobIDs {
		err := rep.Blobs.DeleteBlob(ctx, blob.ID(b))
		if err != nil {
			return errors.Wrapf(err, "error deleting %v", b)
		}
	}

	return nil
}

func init() {
	blobDeleteCommand.Action(repositoryAction(runDeleteBlobs))
}

package cli

import (
	"context"

	"github.com/pkg/errors"

	"github.com/kopia/kopia/repo"
	"github.com/kopia/kopia/repo/blob"
)

var (
	blobDeleteCommand = blobCommands.Command("delete", "Show contents of blobs").Alias("rm")
	blobDeleteBlobIDs = blobDeleteCommand.Arg("blobIDs", "Blob IDs").Required().Strings()
)

func runDeleteBlobs(ctx context.Context, rep *repo.Repository) error {
	for _, b := range *blobDeleteBlobIDs {
		err := rep.Blobs.DeleteBlob(ctx, blob.ID(b))
		if err != nil {
			return errors.Wrapf(err, "error deleting %v", b)
		}
	}

	return nil
}

func init() {
	blobDeleteCommand.Action(repositoryAction(runDeleteBlobs))
}

--- 
+++ 
@@ -10,7 +10,7 @@
 )
 
 var (
-	blobDeleteCommand = blobCommands.Command("delete", "Show contents of blobs").Alias("rm")
+	blobDeleteCommand = blobCommands.Command("delete", "Delete blobs by ID").Alias("rm")
 	blobDeleteBlobIDs = blobDeleteCommand.Arg("blobIDs", "Blob IDs").Required().Strings()
 )
 
[Trivial] Fix command description for blob delete

Fix probable copy paste error on "blob delete" subcommand from
the "blob show" description.
