To rollback a specific migration in Laravel, “pass the –step argument to the migrate:rollback command.”
Here’s how to rollback the last batch of migrations by one step:
- Navigate to your Laravel project root directory.
- Run the following command:
php artisan migrate:rollback --step=1
The –step option allows you to specify how many batches of migrations you want to roll back. In this case, specifying –step=1 will roll back the last batch.
Note: It’s always a good practice to back up your database before rolling back any migrations, especially in a production environment.
You can rollback and re-migrate a limited number of migrations by providing the step option to the refresh command.
For example, the following command will rollback & re-migrate the last two migrations:
php artisan migrate:refresh --step=2
You can roll back a limited number of migrations by providing the step option to the rollback command.
For example, the following command will rollback the last three migrations:
php artisan migrate:rollback --step=3
That’s it!

Krunal Lathiya is a seasoned Computer Science expert with over eight years in the tech industry. He boasts deep knowledge in Data Science and Machine Learning. Versed in Python, JavaScript, PHP, R, and Golang. Skilled in frameworks like Angular and React and platforms such as Node.js. His expertise spans both front-end and back-end development. His proficiency in the Python language stands as a testament to his versatility and commitment to the craft.