Deleting a VLAN on a Cisco switch is a one-line command — but it has ripple effects that are easy to miss if you don’t understand what happens to the ports that were using it. This guide covers the straightforward case of removing a single VLAN, the more surgical approach of pulling a VLAN off a trunk without deleting it entirely, what actually happens to access ports left behind, and finally, the full wipe-and-reset procedure for clearing the VLAN database completely.
Table of Contents
Deleting a VLAN from a Cisco Switch: Step by Step
Here’s the direct process for removing a VLAN from the switch’s VLAN database.
- Confirm the VLAN exists and check what’s currently using it. Before deleting anything, see which ports are assigned to the VLAN you’re about to remove — this tells you what will be affected.
Switch# show vlan id 10- Enter global configuration mode.
Switch# configure terminal- Delete the VLAN using the
no vlancommand.
Switch(config)# no vlan 10- Exit configuration mode and save the change.
Switch(config)# exit
Switch# copy running-config startup-config- Verify the VLAN no longer appears in the VLAN database.
Switch# show vlan brief- Check the ports that were previously assigned to the deleted VLAN. This is the step most commonly skipped — deleting a VLAN doesn’t remove or reassign the ports that referenced it, which is exactly what the later section of this guide covers in detail.
Switch# show interfaces statusDeleting the VLAN itself is simple, but it’s rarely the only thing you actually want to do — in most real scenarios, you either want to remove the VLAN from just one trunk link (covered next) or you’re aware ports will be affected and plan to reassign them afterward.
Removing a VLAN from a Trunk Port Without Deleting It Globally
If your goal is narrower — stopping a specific trunk link from carrying a VLAN, without removing the VLAN from the switch entirely — this is a different, more surgical operation.
- Confirm which VLANs are currently allowed on the trunk.
Switch# show interfaces gigabitEthernet 1/0/48 trunk- Remove the specific VLAN from the trunk’s allowed list. This uses the
removekeyword rather than replacing the entire allowed list, which avoids accidentally dropping other VLANs that should stay on the trunk.
Switch(config)# interface gigabitEthernet 1/0/48
Switch(config-if)# switchport trunk allowed vlan remove 10- Verify the VLAN no longer appears in the trunk’s allowed list.
Switch# show interfaces gigabitEthernet 1/0/48 trunk- Understand what this does and doesn’t affect. The VLAN still exists globally on the switch and remains available for access ports or other trunk links — you’ve only removed its ability to traverse this specific trunk connection.
- Repeat on the far end of the trunk if traffic symmetry matters. Removing a VLAN from only one end’s allowed list can create asymmetric behavior — decide deliberately whether the far end should also stop carrying this VLAN, rather than leaving it inconsistent.
This distinction matters because the two operations solve different problems: use no vlan when you want the VLAN gone entirely from the switch, and use switchport trunk allowed vlan remove when you just want to stop a specific link from carrying it. Confusing the two is a common source of unexpected outages — removing a VLAN from a trunk when the real intent was full deletion (or vice versa) leaves the switch in a state that doesn’t match what was intended.
What Happens to Ports When Their VLAN Is Deleted
Understanding the actual port-level impact of no vlan is what prevents “wait, why is this port not working” tickets after a cleanup.
- Understand that ports are not automatically reassigned. When you delete a VLAN, any access port still configured with
switchport access vlan <deleted-id>keeps that configuration — the switch doesn’t move the port to VLAN 1 or any other default automatically. - Recognize the resulting port state. A port assigned to a VLAN that no longer exists becomes effectively inactive for data forwarding — connected devices lose connectivity even though the physical link may still show as up, since there’s no valid VLAN for the switch to forward their traffic into.
- Confirm this state directly.
Switch# show interfaces statusPorts referencing a deleted VLAN typically show a status indicating the VLAN is no longer valid, distinct from a normal “connected” or “notconnect” state.
- Decide how to handle affected ports. You generally have two options: recreate the VLAN if its deletion was unintentional, or explicitly reassign each affected port to a valid, existing VLAN if the deletion was deliberate.
- Recreate the VLAN if the deletion was a mistake. Simply recreating the VLAN with the same ID restores functionality to ports still referencing it, without needing to touch each port’s configuration individually.
Switch(config)# vlan 10
Switch(config-vlan)# name SALES- Reassign ports explicitly if the deletion was intentional. Move each affected port to whichever VLAN should now handle that traffic.
Switch(config)# interface gigabitEthernet 1/0/5
Switch(config-if)# switchport access vlan 20- Audit for any other affected ports before considering the cleanup complete. Especially on switches with many ports, it’s easy to miss one or two that referenced the deleted VLAN — cross-check your
show interfaces statusoutput against your intended final state. - Remember this same behavior applies to SVIs. If the deleted VLAN had a corresponding Layer 3 interface (
interface vlan <id>), that SVI configuration remains in the running configuration but becomes non-functional, since there’s no VLAN for it to represent — clean this up explicitly if you don’t intend to recreate the VLAN.
Switch(config)# no interface vlan 10The core lesson: no vlan only ever touches the VLAN database entry itself — every port, trunk allowed-list entry, and SVI that referenced it stays exactly as configured, just pointed at something that no longer exists. Plan for that ripple effect before deleting, not after.
Wiping the Entire VLAN Database and Resetting to Defaults
Sometimes the goal isn’t removing one VLAN but starting completely fresh — this is a more drastic operation and worth approaching deliberately.
! === FULL VLAN DATABASE RESET PROCEDURE ===
! WARNING: This removes ALL normal-range VLAN configuration.
! Back up your configuration first if there's any chance
! you'll need to reference current VLAN assignments later.
! Step 1: Back up current configuration and VLAN state
Switch# show running-config > flash:pre-reset-backup.txt
Switch# show vlan brief
! Step 2: Delete the VLAN database file from flash
Switch# delete flash:vlan.dat
! (Confirm the deletion when prompted)
! Step 3: Reload the switch to apply the reset
Switch# reload
! (Confirm the reload when prompted; ensure this is
! scheduled during a maintenance window)
! Step 4: After reload, verify VLAN database is reset to default
Switch# show vlan brief
! Expect to see only the default VLANs (1, 1002-1005)
! Step 5: Recreate any VLANs still needed going forward
Switch(config)# vlan 10
Switch(config-vlan)# name SALES
! (repeat for each VLAN you intend to keep)
! Step 6: Reassign ports to their correct VLANs
Switch(config)# interface gigabitEthernet 1/0/5
Switch(config-if)# switchport access vlan 10
! (repeat for each affected port)
! Step 7: Rebuild trunk allowed-VLAN lists
Switch(config)# interface gigabitEthernet 1/0/48
Switch(config-if)# switchport trunk allowed vlan 10
! (repeat for each trunk interface)
! Step 8: Save the newly rebuilt configuration
Switch# copy running-config startup-configTreat this procedure as a last resort for a genuine fresh start (such as repurposing a switch or clearing a corrupted VLAN database) rather than a routine cleanup step — deleting individual VLANs with no vlan, as covered earlier, is almost always the more appropriate tool when you know exactly which VLANs need to go.











Comments