Make query like this:
$query = new WP_Query( array( 'posts_per_page' => -1, 'category__not_in' => array( 2, 6 ) ) );
2, 6 being the category ID you want to exclude.
Make query like this:
$query = new WP_Query( array( 'posts_per_page' => -1, 'category__not_in' => array( 2, 6 ) ) );
2, 6 being the category ID you want to exclude.