Change WordPress names duplicate titles (url)

For details please see this answer : Remove Dash/Hyphen From WordPress CustomPosttype Permalink

In your functions.php :

function no_dashes($title) {
    return str_replace('-', '', $title);
}
add_filter('sanitize_title', 'no_dashes' , 9999);

For particular type of post :

function no_dashes( $slug, $post_ID, $post_status, $post_type ) {

    if( $post_type == "page" ) {
        $slug = str_replace( '-', '', $slug);
    }
    return $slug;
}
add_filter( "wp_unique_post_slug", "no_dashes", 10, 4 );