How to remove categories filter from wordpress admin?

I removed the categories column from “All posts” page by applying this code.

add_filter("manage_edit-post_columns", "my_post_edit_columns");
function my_post_edit_columns($columns){
  unset($columns['categories']);
  return $columns;
}

This code removed categories column. But still i see the categories filter in the top.
Is there a way to remove it other than using CSS to hide it?

Thanks

Solutions Collecting From Web of "How to remove categories filter from wordpress admin?"

I tested this and it works for removing the categories dropdown on the All Posts page:

add_action( 'load-edit.php', 'no_category_dropdown' );
function no_category_dropdown() {
    add_filter( 'wp_dropdown_cats', '__return_false' );
}

— below: old answer when I misunderstood the question —

The code you posted works just fine for me. But here’s an alternative you might try:

add_filter("manage_posts_columns", "my_post_edit_columns" );
function my_post_edit_columns($columns){
    unset($columns['categories']);
    return $columns;
}

This will also impact other post types that have a ‘categories’ column.

I think the select elements are passed through the wp_dropdown_cats filter. So you should be able to add a filter to that which returns a blank string.