For a recent client, we upgraded his website from Magento 2.2.0 to Magento 2.2.1 and you can do it too.

We have prepared a list of commands that explains how to update Magento 2.2.0 to 2.2.1.

Note: This article is NOT for a beginner/novice in Magento development.

composer require magento/product-community-edition <magento version> --no-update
composer update
rm -rf var/di var/generation
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex

However, while doing this we faced an issue that the composer update was throwing an exception,

 'failed to decode response:zlib_decode()'

To fix this issue, we executed the following command:

sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf

After executing this command, we were faced with YET another error which occurred while downloading the import-export module from composer update. This occurred because the curl was not installed on the system. Once we installed it, the Magento version was successfully updated from 2.2.0 to 2.2.1