Magento Upgrade

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