There are three ways to upgrade Magento theme and modules. We use Composer for its flexibility and coonvenience.

Set my magento website to Developer Mode first.

bin/magento mode:set developer

Remove existing cached and generated files.

  • rm -rf var/view_generated/*
  • rm -rf var/cache/*
  • rm -rf var/page_cache/*
  • rm -rf generated/code/*
  • rm -rf pub/static



Source: Command-line upgrade | Magento 2 Developer Documentation