

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 刪除網路介面
<a name="delete_eni"></a>

刪除網路介面會釋放所有與介面關聯的屬性，並釋放其他執行個體要使用的所有私有 IP 位址或彈性 IP 位址。

您無法刪除正在使用的網路介面。首先，您必須[分開網路介面](network-interface-attachments.md#detach_eni)。

------
#### [ Console ]

**刪除網路介面**

1. 前往 [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/) 開啟 Amazon EC2 主控台。

1. 在導覽窗格中，選擇 **Network Interfaces (網路介面)**。

1. 選取網路介面的核取方塊，然後選取 **Actions** (動作)、**Delete** (刪除)。

1. 出現確認提示時，請選擇 **Delete (刪除)**。

------
#### [ AWS CLI ]

**若要刪除網路介面**  
使用下列 [delete-network-interface](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-network-interface.html) 命令。

```
aws ec2 delete-network-interface --network-interface-id eni-1234567890abcdef0
```

------
#### [ PowerShell ]

**若要刪除網路介面**  
使用 [Remove-EC2NetworkInterface](https://docs.aws.amazon.com/powershell/latest/reference/items/Remove-EC2NetworkInterface.html) cmdlet。

```
Remove-EC2NetworkInterface -NetworkInterfaceId eni-1234567890abcdef0
```

------