> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameSaveDeleteContainer

> XGameSaveDeleteContainer

# XGameSaveDeleteContainer

Deletes an XGameSaveContainer from cloud storage.

## Syntax

```cpp theme={null}
HRESULT XGameSaveDeleteContainer(  
         XGameSaveProviderHandle provider,  
         const char* containerName  
)  
```

### Parameters

*provider*   \_In\_\
Type: XGameSaveProviderHandle

Handle to the XGameSaveProvider which contains the container to be deleted.

*containerName*   \_In\_z\_\
Type: char\*

The name of the container to be deleted.

### Return value

Type: HRESULT

Function result.

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

This operation may sometimes run slow, it is somewhat dependent on the size of the data being deleted. This operation is serialized to ensure we always have a consistent representation of the data. This method has an asynchronous version, [XGameSaveDeleteContainerAsync](/reference/system/xgamesave/functions/xgamesavedeletecontainerasync).

```cpp theme={null}
void Sample::_DeleteContainer(const char* name) 
{ 
    HRESULT hr = XGameSaveDeleteContainer(_provider, name); 
    if (FAILED(hr)) 
    { 
        _HandleContainerErrors(name, hr); 
    } 
} 
```

## Requirements

**Header:** XGameSave.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XGameSave](/reference/system/xgamesave/xgamesave_members)\
[XGameSaveDeleteContainerAsync](/reference/system/xgamesave/functions/xgamesavedeletecontainerasync)\
[Debugging Game Saves](/build/core-features/common/game-save/game-saves-debugging)


## Related topics

- [XGameSaveDeleteContainerAsync](/reference/system/xgamesave/functions/xgamesavedeletecontainerasync.md)
- [XGameSave API overview](/build/core-features/common/game-save/xgamesave.md)
- [XGameSave](/reference/system/xgamesave/xgamesave_members.md)
- [XGameSaveDeleteContainerResult](/reference/system/xgamesave/functions/xgamesavedeletecontainerresult.md)
- [XGameSaveSubmitBlobDelete](/reference/system/xgamesave/functions/xgamesavesubmitblobdelete.md)
