Alternate solution that works for me when I get the "Failed deleting inaccessible file xxx" error installing updates for CB or other extensions, which I found at
help.joomlatools.com/article/338-known-issues
open the file located at libraries/vendor/joomla/filesystem/src/File.php and comment lines 124 to 127. You should end up having something like this:
/*if (!Path::canChmod($file))
{throw new FilesystemException(__METHOD__ . ': Failed deleting inaccessible file ' . $filename);
}*/
Removing those lines would also work.