add free command to debian,redhat path

Cherry Pick from master