To update Magento 2.0.x with sample data, I followed these steps (also works to update to 2.1 RC):
Apply this commit manually (it's a bugfix for the sample data that is released with 2.1)
Reset the sample data modules in Magento
bin/magento sampledata:reset
- if you get an ErrorException about not found composer.json files, see: bin/magento sampledata:reset tries to read nonexistent composer.jsonbin/magento sampledata:reset tries to read nonexistent composer.json
Update composer.json without immediately updating dependencies (this would result in a conflict because the old magento module versions are still locked). For 2.0.7:
composer require --no-update magento/product-community-edition ~2.0.7
or for the latest 2.1 release candidate
composer require --no-update magento/product-community-edition 2.1.0-rc3
[only if you update to >=2.1] Remove the sample data modules from
composer.json
:"magento/module-bundle-sample-data": "100.0.*", "magento/module-theme-sample-data": "100.0.*", "magento/module-widget-sample-data": "100.0.*", "magento/module-catalog-sample-data": "100.0.*", "magento/module-customer-sample-data": "100.0.*", "magento/module-cms-sample-data": "100.0.*", "magento/module-catalog-rule-sample-data": "100.0.*", "magento/module-sales-rule-sample-data": "100.0.*", "magento/module-review-sample-data": "100.0.*", "magento/module-tax-sample-data": "100.0.*", "magento/module-sales-sample-data": "100.0.*", "magento/module-grouped-product-sample-data": "100.0.*", "magento/module-downloadable-sample-data": "100.0.*", "magento/module-msrp-sample-data": "100.0.*", "magento/module-configurable-sample-data": "100.0.*", "magento/module-product-links-sample-data": "100.0.*", "magento/module-wishlist-sample-data": "100.0.*", "magento/module-swatches-sample-data": "100.0.*", "magento/sample-data-media": "100.0.*", "magento/module-offline-shipping-sample-data": "100.0.*",
Run the actual composer update:
composer update
[only if you update to >=2.1] Reinstall sample data (you might need to apply the patch from (2) again):
bin/magento sampledata:deploy