title: Removing the tc config on a particular interface
body: <p>I am new to using the tc command.</p>
  
  <p>I am writing a test script to add delays to an interface. This is being done using python and fabric api</p>
  
  <p>So the script will do something like:</p>
  
  <blockquote>
    <p>sudo tc qdisc add dev eth1 root netem delay</p>
  </blockquote>
  
  <p>And at the end of script we would do </p>
  
  <blockquote>
    <p>sudo tc qdisc del dev eth1 root netem</p>
  </blockquote>
  
  <p>But at the same time I wanted to make sure at the very beginning that there was no existing tc control that has been done on the system. So I wanted to run the delete command before the whole script started.
  but that gives me an error if there is no tc config done.</p>
  
  <blockquote>
    <p>abc@abcvmm:~$ sudo tc qdisc del dev eth1 root netem</p>
    
    <p>RTNETLINK answers: Invalid argument</p>
  </blockquote>
  
  <p>Is there a way to delete the interface configured only if there is an existing tc config done and not otherwise.</p>