code: func (n *NetNs) Remove() error {
  	n.Lock()
  	defer n.Unlock()
  
  	if n.closed {
  		// netNsRemove() can be called multiple
  		// times without returning an error.
  		return nil
  	}
  
  	if err := n.symlinkRemove(); err != nil {
  		return err
  	}
  
  	if err := n.Close(); err != nil {
  		return err
  	}
  
  	n.closed = true
  
  	if n.restored {
  		// we got namespaces in the form of
  		// /var/run/netns/cni-0d08effa-06eb-a963-f51a-e2b0eceffc5d
  		// but /var/run on most system is symlinked to /run so we first resolve
  		// the symlink and then try and see if it's mounted
  		fp, err := symlink.FollowSymlinkInScope(n.Path(), "/")
  		if err != nil {
  			return err
  		}
  		if mounted, err := mount.Mounted(fp); err == nil && mounted {
  			if err := unix.Unmount(fp, unix.MNT_DETACH); err != nil {
  				return err
  			}
  		}
  
  		if n.Path() != "" {
  			if err := os.RemoveAll(n.Path()); err != nil {
  				return err
  			}
  		}
  	}
  
  	return nil
  }
docs: // Remove ensures this network namespace handle is closed and removed