---
layout: api_prebidjs
title: pbjs.removeAdUnit(adUnitCode)
description: removeAdUnit API
sidebarType: 1
---


Remove adUnit(s) from the pbjs configuration, If adUnit is not given then it will remove all adUnits

**Kind**: static method of pbjs API.

{: .table .table-bordered .table-striped }
| Param | Scope | Type | Description |
| --- | --- | --- | --- |
| adUnitCode | Optional | `String or Array of strings` | the adUnitCode(s) to remove, if empty it removes all |
