disbale default widgets on theme activation

Default widgets are not usually activated with the theme. Themes add default widgets in the sidebar template file. For example take a look at twenty ten sidebar.php file:

<?php
/**
 * The Sidebar containing the primary and secondary widget areas.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
?>
<div id="primary" class="widget-area" role="complementary">
    <ul class="xoxo">

<?php
    /* When we call the dynamic_sidebar() function, it'll spit out
     * the widgets for that widget area. If it instead returns false,
     * then the sidebar simply doesn't exist, so we'll hard-code in
     * some default sidebar stuff just in case.
     */
    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

            <li id="search" class="widget-container widget_search">
                <?php get_search_form(); ?>
            </li>
            <li id="archives" class="widget-container">
                <h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
                <ul>
                    <?php wp_get_archives( 'type=monthly' ); ?>
                </ul>
            </li>
            <li id="meta" class="widget-container">
                <h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
                <ul>
                    <?php wp_register(); ?>
                    <li><?php wp_loginout(); ?></li>
                    <?php wp_meta(); ?>
                </ul>
            </li>
        <?php endif; // end primary widget area ?>
    </ul>
</div><!-- #primary .widget-area -->

as you can see the default widgets (which in this case are: search, archives and meta) are hard coded inside a dynamic_sidebar conditional check to see if this sidebar has any widgets set by the user.

So to answer your question make sure your sidebar file has no default widgets inside the dynamic_sidebar() conditional check.

Update:

I’m strongly against removing the configured and saved widgets of a previously used theme and think that you should not do it but if you must then you can catch the theme activation and trigger a simple function to clear saved widgets ex:

if ( is_admin() && isset($_GET['activated'] ) && $pagenow == 'themes.php' ) {
    add_action('admin_footer','removed_widgets');
}


function removed_widgets(){
    //get all registered sidebars
    global $wp_registered_sidebars;
    //get saved widgets
    $widgets = get_option('sidebars_widgets');
    //loop over the sidebars and remove all widgets
    foreach ($wp_registered_sidebars as $sidebar => $value) {
        unset($widgets[$sidebar]);
    }
    //update with widgets removed
    update_option('sidebars_widgets',$widgets);
}