FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
vbarrios
Staff
Staff
Article Id 366585
Description

This article describes how to remove an SSID (VAP interface) that cannot be deleted from the GUI or CLI because the system reports that the VAP interface can only be removed from the VAP interface table, and the command fails with error code ret=-160.

Scope FortiGate, FortiWifi, FortiAP.
Solution

1. Remove all references to the SSID from the GUI.

  • Go to Network → Interfaces and remove or change any interfaces that use the SSID / VAP.

  • Remove related firewall policies (for example, under Policy & Objects → Firewall Policy) that reference this SSID interface.

  • Verify that the SSID has no references. Delete any related Address objects, DHCP server entries, or other objects that still point to this SSID.

  • If needed, see this article: Technical Tip: Unable to delete SSID for details on finding and removing all references from the GUI.

 

SSID-usage.jpg

 

  1. If the SSID still cannot be deleted and the CLI shows error ret=-160, use the config-file workaround: Technical Tip: How to download FortiGate configuration file & Debug log from GUI.

  • Edit the configuration file offline.
  • Open the config file in a text editor.
  • Locate the config system interface section.
  • Find the edit '<SSID-name>' entry that corresponds to the stuck SSID (for example, the VAP interface).
  • Carefully remove only that interface block.
  • Upload and restore the edited configuration to the FortiGate
  • Confirm that the SSID interface no longer appears and that no other configuration items are missing.

 

Recommendation:

Use the config-file method only when the normal GUI reference-cleanup process does not allow the SSID to be deleted. Always keep a backup of the original configuration in case a rollback is required.

 

Another option is to remove the SSID via CLI when it is not possible to remove it from the GUI:

 

config wireless-controller vap
    delete "<ssid_name>"
end

 

Related article:

Technical Tip: Unable to delete SSID