I use the following code to generate a list of the titles of the 10 most recent post in my sidebar and exclude 1 category (with id=18 in this example):
<ul>
<?php $temp_query = $wp_query; query_posts('showposts=10&cat=-18'); ?>
<?php while (have_posts()) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to “<?php the_title(); ?>”"><?php the_title(); ?></a></li>
<?php } $wp_query = $temp_query; ?>
</ul>
You can exclude only 1 category, in this example category 18 is excluded (note the minus sign).
There is one disadvantage: only post that have ONLY category 18 assigned, are excluded. If a post has other categories besides category 18 assigned, it will not be excluded.
Normally you would use
<?php wp_get_archives('type=postbypost&limit=10'); ?>
to generate such a list, but wp_get_archives doesn’t have an exlude parameter.
I am using the Asides in my sidebar and don’t want to show my Aside posts to show in the Recent posts, so my Asides all have a category with id=18 in the above example.
See the documentation on the query_posts template tag for more options.