Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Chron's avatar
Level 6

Is there a way to revert back the installed packages from composer

I still have the copy of the previous composer json and lock file. Is there a way to revert back using those files?

0 likes
4 replies
Tray2's avatar

Just overwrite those files and do a composer install and you should be good.

Chron's avatar
Level 6

Should I remove the vendor folder first?

What should I overwrite? the json or the lock file?

MichalOravec's avatar
Level 75

Yes overwrite json and lock file. You don't have to remove vendore folder. Composer remove unused packages automatically.

Please or to participate in this conversation.