OS: Ubuntu, v20.04.2 LTS
Node Version: v12.22.1
Ghost Version: 4.2.0
Ghost-CLI Version: 1.16.3
Environment: production
I recently tried to update from 4.2.0 to 4.3.2. When I updated, it threw an error, which I resolved by updating my permissions, but then it only updated me to 4.2.2, and seemingly not completely.
Exactly steps I took to update:
$ sudo apt-get update
$ sudo apt-get upgrade
$ <created backup>
$ sudo npm i -g ghost-cli@latest
$ cd <my ghost blog directory>
$ ghost update
<usual update checks passed, omitted for brevity>
✔ Fetched release notes
✔ Downloading and updating Ghost to v4.2.2
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
✔ Restarting Ghost
✖ Removing old Ghost versions
An error occurred.
Message: 'EACCES: permission denied, unlink '/var/www/<my blog>/blog/versions/3.35.5/Gruntfile.js''
Now ghost --version
reports that I’m at 4.2.2 even though it ended with the error in removing the old version. Okay, well I don’t need those old versions, right? So I manually removed it.
$ sudo rm -rf /var/www/<my blog>/versions/3.35.5/
However, running ghost update
once again still throws the same error, except now on the currently oldest version (what was previously the second oldest version).
I could just keep deleting old versions… but perhaps there’s a better solution? Any advice would be appreciated.
Thanks