So this is the issue:
When creating a new network interface using luci, I attached it to a new interface named eth1.12 and saved the configuration. problem is that the correct interface name was eth0.12. I changed it and now the eth1.12 interface still appears on the list of interfaces on luci. It's driving me mad.
on /etc/config there is no file that has eth1.12 on it and flasing the device again ( keeping configurations ) doesn't solve the issue.
Can anyone tell me where is this stored so that I can delete it?
I guess you defined some VLANs using the internal switch, and it is not resetting properly; try to use the swconfig utility to see how is the switch configured and reset it.
I don't think this is related to swconfig. I Do have two vlans configured on the swtich, vlan 1 and 2 with vid 1 and vid 12 and they appear on the config/network file. but nothing related to the eth1.12 interface appears inside /etc...
there must be some file that holds this information but I am unable to find it.
yep.
See screenshots.!
This is easy to reproduce. Just create a new interface and name it something and then try to delete it and it will remain on the list.
that cpu(eth1) label is wrong. The five ports are one switch that is then internally divided into eth0 for 4 lan ports and eth1 for the wan port but from a software point of view both the four lan ports and the wan port are mapped into eth0. the lan ports are eth0 and the wan port is eth0 ( vlanid 12 )
Anyway, the switch was configured before I made the mistake on the luci add new interface page and the etx.xx interfaces were not listed on the physical settings page. This is supposed to be like that. They only appear on the list after you add them. and the problem is that then there is no way of removing them, and they don't appear anywhere on /etc/
This is what I made: I clicked on create new interface, then on the physical settings I selected "custom interface" and wrote eth1:12 ( this because obviously eth1:12 was not on the list ( eth0:12 was also not there ). Then I noticed the error and created a new custom eth0:12 interface.
Sorry, I am not following you... your switch configuration says one thing, and you say something different...
That file you posted says that both eth0 and eth1 are on the same switch, and you have eth1 on VLAN12. Wasn't the switch configured properly for your device? What device are you using? Why don't you just take eth1 out of VLAN 12 and see what happens?