To update through composer, use the following commands:

export VERSION="2.0.2"
cd ~/magento2

composer require magento/product-community-edition $VERSION --no-update
composer update

rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex

After upgrade, check your Magento version with the following command:

php bin/magento --version