---
title: "removeWindowsItem(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplication/removewindowsitem(_:)"
---

# removeWindowsItem(_:)

Removes the Window menu item for a given window.

## Declaration

```swift
func removeWindowsItem(_ win: NSWindow)
```

## Parameters

- `win`: The window whose menu item is to be removed.

## Discussion

Discussion This method doesn’t prevent the item from being automatically added again. Use the isExcludedFromWindowsMenu method of NSWindow if you want the item to remain excluded from the Window menu.

## See Also

### Managing the Window Menu

- [windowsMenu](appkit/nsapplication/windowsmenu.md)
- [addWindowsItem(_:title:filename:)](appkit/nsapplication/addwindowsitem(_:title:filename:).md)
- [changeWindowsItem(_:title:filename:)](appkit/nsapplication/changewindowsitem(_:title:filename:).md)
- [updateWindowsItem(_:)](appkit/nsapplication/updatewindowsitem(_:).md)
