<p>I have a K3s setup with calico pods [<code>calico-node-</code> &amp; <code>calico-kube-controllers-</code>] running. On uninstalling K3s, calico pods get deleted but I see that <code>calicoctl</code> and <code>iptables -S</code> commands still running and shows data.</p>
<p>I want to delete calico (including <em>calicoctl</em> and <em>Iptables</em> created by calico) completely. Which commands will help me to do so ?</p>
<p><strong>K3s uninstalltion command:</strong> <code>/usr/local/bin/k3s-uninstall.sh</code> deletes all k3s pods including calico, but <code>calicoctl</code> and <code>iptables -S</code> still works.</p>
<p><strong>PS:</strong> I already tried few things -</p>
<ol>
<li>Command <code>kubectl delete -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.5/config/v1.5/calico.yaml</code> deletes the <code>calico-node-</code> but <em><code>calico-kube-controller</code></em> , <em><code>calicoctl</code></em> and <em><code>iptables -S</code></em> are still present</li>
<li><code>Kubectl delete</code> commands in <a href="https://stackoverflow.com/questions/53610641/how-to-delete-remove-calico-cni-from-my-kubernetes-cluster/53610810#53610810">this que</a> also not working for me, after executing these two commands still <em><code>calicoctl</code></em> and <em><code>iptables -S</code></em> are present</li>
</ol>

solveit
<p><strong>Deleting calico-Iptables:</strong></p>
<p>Use <a href="https://github.com/projectcalico/calico/blob/master/hack/remove-calico-policy/remove-calico-policy.sh" rel="nofollow noreferrer">calico-policy</a> and add below lines at the end of script:</p>
<pre><code>echo &quot;Flush remaining calico iptables&quot;
iptables-save | grep -i cali | iptables -F

echo &quot;Delete remaining calico iptables&quot;
iptables-save | grep -i cali | iptables -X
</code></pre>
<p>This will delete all calico iptables when you check with <code>iptables -S</code></p>
<p><strong>Note:</strong> Run this script only after uninstalling K3S.</p>
<p><strong>Deleting calicoctl:</strong></p>
<p>Simply run <code>sudo rm $(which calicoctl)</code> command, it will find and delete the calicoctl.</p>
