Update failed. Did you modify something in /home/ubuntu/mailinabox? - SOLVED

When trying to update Mail-In-A-Box from V0.48 to V0.50 I received this error:
Updating Mail-in-a-Box to v0.50 . . . remote: Enumerating objects: 1, done. remote: Counting objects: 100% (1/1), done. remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 Unpacking objects: 100% (1/1), done. error: Your local changes to the following files would be overwritten by checkout: conf/nginx-alldomains.conf Please commit your changes or stash them before you switch branches. Aborting Update failed. Did you modify something in /home/ubuntu/mailinabox?

I did not change nginx-alldomains.conf but…sometimes this happens. It may be regarding another file that you actually did change.
The nice thing is…it’s an easy fix.

First, if you actually did change the file that is throwing the error. Rename it to something else.
sudo mv nginx-alldomains.conf nginx-alldomains.conf
Then run the upgrade script.
curl -s https://mailinabox.email/setup.sh | sudo bash
After the upgrade, you can decide if you want to make the changes again to the new file.

Second, if you didn’t make any changes to that file as I did in the error that I received. Again, easy fix.
You can just remove the file. Mail-In-A-Box upgrade script will re-create the file.
sudo rm nginx-alldomains.conf

1 Like

Thanks for posting


1 Like

Adding my thanks. Great tip!!