def remove(self, req):
        # type: (InstallRequirement) -> None
        """Remove an InstallRequirement from build tracking.
        """

        # Delete the created file and the corresponding entries.
        os.unlink(self._entry_path(req.link))
        self._entries.remove(req)

        logger.debug('Removed %s from build tracker %r', req, self._root)
Remove an InstallRequirement from build tracking.
        
product/gradle-plugin/src/main/python/pip/_internal/req/req_tracker.py