To achieve this you need to use Unset / Remove method.
To move a child block from one parent to another, reference the direct parent, call unsetChild on it, and then use the insert/add block method to assign the block instance as child to a different parent.
Try below code in your local.xml
<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
<default>
<reference name="right">
<action method="unsetChild"><name>cart_sidebar</name></action>
</reference>
</default>
<!--If you are not using layered navigation code start -->
<catalog_category_default>
<reference name="right">
<action method="insert"><block>cart_sidebar</block></action>
</reference>
</catalog_category_default>
<!--If you are not using layered navigation code end -->
<!--If you are using layered navigation code start -->
<catalog_category_layered>
<reference name="right">
<action method="insert"><block>cart_sidebar</block></action>
</reference>
</catalog_category_layered>
<!--If you are using layered navigation code end -->
<catalog_product_view>
<reference name="right">
<action method="insert"><block>cart_sidebar</block></action>
</reference>
</catalog_product_view>
</layout>