cockroach userfile delete command deletes the files stored in the user-scoped file storage which match the provided pattern, using a SQL connection. If the pattern '*' is passed, all files in the specified (or default, if unspecified) user-scoped file storage will be deleted. Deletions are not atomic, and all deletions prior to the first failure will occur.
Required privileges
The user must have theCREATE privilege on the target database. CockroachDB will proactively grant the user GRANT, SELECT, INSERT, DROP, DELETE on the metadata and file tables.
A user can only delete files from their own user-scoped storage, which is accessed through the userfile URI used during the upload. CockroachDB will revoke all access from every other user in the cluster except users in the admin role. Users in the admin role can delete from any user’s storage.
Synopsis
Delete a file:Flags
Examples
Delete all files in the default storage
To delete all files in the directory, pass the'*' pattern:
userfile://defaultdb.public.userfiles_$user/) were deleted.
Delete a specific file
To delete a specific file, include the file destination in the command:Delete files that match the provided pattern
To delete all files that match a pattern, use*:
Delete files from a non-default userfile URI
If you uploaded a file to a non-default userfile URI (e.g.,userfile://testdb.public.uploads):

