# RemoveAssetBundleName(string, bool)

> Remove the AssetBundle name from the Asset Database.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static bool RemoveAssetBundleName(string assetBundleName, bool forceRemove)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The AssetBundle name you want to remove.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Flag to indicate if you want to remove the AssetBundle name even it's in use.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Examples

```csharp
using UnityEditor;
using UnityEngine;

public class AssetDatabaseExamples : MonoBehaviour
{
    [MenuItem("AssetDatabase/Remove Bundle Name")]
    static void RemoveAssetBundleNameExample()
    {
        //Remove Asset Bundle name that is on Cube.prefab and it's dependencies
        var prefabPath = "Assets/Prefabs/Cube.prefab";
        var assetBundleName = AssetDatabase.GetImplicitAssetBundleName(prefabPath);
        var assetBundleDependencies = AssetDatabase.GetAssetBundleDependencies(assetBundleName, true);
        AssetDatabase.RemoveAssetBundleName(assetBundleName, true);
        foreach (var bundleName in assetBundleDependencies)
        {
            AssetDatabase.RemoveAssetBundleName(bundleName, true);
        }
    }
}
```
