---
title: "removePortForName:"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsportnameserver/removeportforname:"
---

# removePortForName:

Unregisters the port for a given name on the local host.

## Declaration

```occ
- (BOOL) removePortForName:(NSString *) name;
```

## Parameters

- `name`: The name of the port to unregister.

## Return Value

Return Value true if successful, otherwise false.

## Discussion

Discussion If the operation is successful, the port can no longer be looked up using the name name. Other applications that already have a reference to the port can continue to use it until it becomes invalid.

## See Also

### Registering Ports

- [registerPort:name:](foundation/nsportnameserver/registerport:name:.md)
