Deleting Redunant Vias

I am converting from a 4 layer to a 2 layer board.
I have done this before by setting “4” to “2” in the board setup, filling the top layer as GND and then some expected touch up.
This works fine but all of the GND vias connecting to the former middle layer remain. I am not sure what layers they connect but I hand delete them all. Wanting to automate this process I tried the
Edit: Cleanup Tracks and Vias: Delete Redundant Vias
This does not seem to remove the vias.

Any ideas?

I don’t quite get it. Are they kind of isolated now? If not, on a 2 layer board it should be easy to identify what they connect to, e.g. by their net name.
Can you attach a screenshot?

Sorry Martin - I should have included the (177.6 KB)

I now see they connect the top to bottom board and are isolated on the bottom as expected
They are not isolated -they are immersed in the copper pour. Take a look at (5.12, 2.92) for example.

I was just hoping for a delete command.


The problem is the track attached to the via. if you remove the track, it is cleaned up.
I do not exactly know what KiCad’s definition of “redundant” is, but the track seems to make it non-redundant. Which makes no sense in my opinion.

I feel that redundant vias

  • do not connect to anything (obviously)
  • connect to only one plane (zone), regardless of any track attached
  • are duplicates ( on top of each other)

Maybe one of the GODs (Grand Old Developers :slight_smile: ) like e.g. @JeffYoung can jump in and explain.

According to the tooltip text, a “redundant via” is a “Via on a through hole pad or superimposed via”, and that translates to two “holes” in the same location. (Hmm, I wonder what this does if the diameter of the via’s are not the same…)

But in the Cleanup Tracks and Vias, there is also a checkbox for [x] Delete vias connected on only one layer (has no tooltip) and this looks like it should remove those via’s, but it does not do this. To me it smells like a bug.

Yeah, same smell here :-). @fsonnichsen: do you want to report the bug or should I?

Thanks all!
Martin–if you would like to report it you are probably a lot more facile at this than I am. So please do if you are so inclined.

Looks like I will have to hunker down with a beer for now and hand delete the vias—life is good!

Cheers and thanks again

Ok. I’ll take it.
Dann mal Prost aus Wien :slight_smile:

“Redundant” means two vias (or a via and a pad) doing the same thing (ie: same location, layerset, etc.).

The other case is “dangling”, which means that the via has only one connection. The test is currently not any more sophisticated than that, so if both connections are on the same layer (making the via of questionable use) it is still considered not dangling.

Thanks Jeff-- always good to know the terminology and I did not-

Danke aus Cape Cod- USA

I opened the PCB in KiCad V5.1.9 and in V5.99, and deleted the zones on both layers.
In KiCad V5.1.9 the dangling via’s and tracks clean up fine, but in V6.99 they do not.
This tread was apparently made for KiCad V5.1, while the gitlab issue created for it mentions V5.99

Paul–I was on 5.1.7-1 (5.1.9 must have got past me) so I upgraded. The "Edit: Cleanup Tracks and Vias: Delete Redundant Vias " still does not clean up the dangling ones with 5.1.9.
I am not clear on what deleting the zones accomplishes? I need the zones to supplant the purpose of the vias among other things.
Just to be clear–I am moving from 4 to 2 layers, in which case the vias are replaced by direct connection to the appropriate layer instead of through the via. Thus I want to delete the vias after this is done.


I interpret this as:
If a via connects a track and a zone (even on the same layer) then the via connects two things, and thus it is not considered a dangling via.

As I wrote in my previous post, in V5.1 they only get cleaned up after the zones are deleted.

I would be a little less forgiving and interpret it as:
Kicad implements a simple and very deterministic algorithm, but one that doesn’t terribly well match real-world use. :wink:

1 Like

So #7004 will be classified “as designed” or “opinion”?

No, it’s definitely a bug. The message says “connected on less than two layers”.

So then the question is do we fix the behaviour or the message? I lean toward fixing the behaviour.

I think so, too. Matching real-world use cases (citing you).
Might be moderate prio though.

Oh, there’s a fix already, beating my reply by 2 minutes :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.