How to remove Trash link from custom post type

<?php
function directory_skip_trash($post_id) {
    if (get_post_type($post_id) == 'directory') {
        // Force delete
        wp_delete_post( $post_id, true );
    }
} 
add_action('wp_trash_post', 'directory_skip_trash');

another way

Adding this snippet to the functions.php of your wordpress theme or your plugin will remove the edit, view, trash and quick edit links that you see when you mouse over a post type list.

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions )
{
    if( get_post_type() === 'your_post_type' )
        unset( $actions['edit'] );
        unset( $actions['view'] );
        unset( $actions['trash'] );
        unset( $actions['inline hide-if-no-js'] );
    return $actions;
}

you can replace your_post_type with your preferred post typle like books, videos..