Exclude a package from updating in composer


Whenever I try to add a new package using composer like
"composer require packagename/package" or use "composer.phar update", I am getting all the installed packages updated. Is there any option in composer to exclude some package that I don't need to get updated?

Best Solution

From my experience, the best way to exclude 1 or some packages is to use --interactive in composer update.

$ composer update --interactive

When you do this you can select which package you want to update and skip the package that you don't want to update.