Is it possible to delete an interface

If there is no VLAN database on a switch and an admin enters interface configuration mode and enters the following:

Switch(config)#int f0/13
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 13
% Access VLAN does not exist. Creating vlan 13

If the VLAN database is configured on a switch and contains VLAN 10, and int f0/13 is configured to belong to VLAN 10, explain what happens on int f0/13 and VLAN 10 if the admin deletes VLAN 10 from the database?

I am just really confused with what happened to the interface. When I ran the first set of commands VLAN 13 was created and the interface belonged to VLAN 13. then after creating a VLAN database and assigning the interface f0/13 to it, the interface belonged to the VLAN I created.
Now after deleting the VLAN created the interface disappeared, I ran the " show vlan" command, and I couldn’t see the interface f0/13. It didn’t go back to VLAN 13 or the native VLAN. I’m just really confused about what happened to the interface and how come it’s not showing up in the VLAN database.

When you remove a VLAN, all interfaces assigned to that VLAN will not be assigned to anything. They don’t “return” to VLAN 1. Here’s an example:

Switch(config)#interface GigabitEthernet 0/1
Switch(config-if)#switchport access vlan 100
% Access VLAN does not exist. Creating vlan 100

Let’s verify the VLAN assignment:

Switch#show vlan | include Gi0/1
100  VLAN0100                         active    Gi0/1
Switch#show interfaces Gi0/1 switchport | include Access
Access Mode VLAN: 100 (VLAN0100)

Above we can see Gi0/1 is in VLAN 100. Let’s delete VLAN 100:

Switch(config)#no vlan 100

It won’t show up anymore in the show vlan overview:

Switch#show vlan | include Gi0/1
 

When you look at the switchport info we can see something else:

Switch#show interfaces Gi0/1 switchport | include Access
Access Mode VLAN: 100 (Inactive)

Here it shows up as inactive so we know that the interface is unusable now.

Hope this helps.

Rene