def remove_forward(self, local=None):
        """
        Perform `adb forward --remove` command

        Args:
            local: local tcp port

        Returns:
            None

        """
        if local:
            cmds = ["forward", "--remove", local]
        else:
            cmds = ["forward", "--remove-all"]
        try:
            self.cmd(cmds)
        except AdbError as e:
            # ignore if already removed or disconnected
            if "not found" in (repr(e.stdout) + repr(e.stderr)):
                pass
        except DeviceConnectionError:
            pass
        # unregister for cleanup
        if local in self._forward_local_using:
            self._forward_local_using.remove(local)

        Perform `adb forward --remove` command

        Args:
            local: local tcp port

        Returns:
            None

        
airtest/core/android/adb.py