def remove_tiles_from_dir(dirname, tileid):
    for tileid0 in tileid:
        for ext in ['fits.gz', 'png', 'log']:
            expidstr= '{:06d}'.format(tileid0)
            os.remove(os.path.join(
                dirname, expidstr[:3],
                'fiberassign-{}.{}'.format(expidstr, ext)))