Major module update with Composer
No you don't uninstall the module first. You want to have the module enabled when updating to let possible database updates kick in. Which may be performed to update existing data/entities. If you already have the latest 1.x version installed you could simply do


$ composer require drupal/admin_toolbar to upgrade the module.
$ drush cr &amp;&amp; drush -y updb to perform database updates.
And finally $ drush -y cex to export any eventually updated config.


If you don't have the latest 1.x version installed yet, it's better to upgrade incrementally. And to play really safe to also do two consecutive releases for that.


$ composer update drupal/admin_toolbar --with-dependencies &amp;&amp; drush cr &amp;&amp; drush -y updb &amp;&amp; drush -y cex to first update to the latest 1.x version, followed by a release.
And then $ composer require drupal/admin_toolbar &amp;&amp; drush cr &amp;&amp; drush -y updb &amp;&amp; drush -y cex to get the latest major upgrade, followed by another release.