Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save halliba/c0c07002bdd6ca89a839f63543021aa1 to your computer and use it in GitHub Desktop.
Save halliba/c0c07002bdd6ca89a839f63543021aa1 to your computer and use it in GitHub Desktop.
How to downgrade a Synology DSM package that has dependent packages.

How to downgrade a Synology DSM package that has dependent packages

Initial Situation

  • Package OpenERP, installed in version 7.0.0-0106
  • Package Python Modules, previously installed in version 0114, was automatically updated to version 0115
  • The update caused OpenERP to fail, due to missing compatibility with Python Modules in version 0115
  • No update available for OpenERP because it is EOL and replaced by https://www.odoo.com/

Problem

Synology DSM is not capable of downgrading individual packages and you can not uninstall a package (to install the older version), when there are packages installed, that depend on the package to be downgraded. Uninstalling the depending packages is often not in option or the last way to go.

Prepare

  • Do a full system and data backup - just in case
  • Enable SSH server on the Synology via [Control Center -> Terminal & SNMP].
  • Download the older package version here: https://archive.synology.com/download/Package
  • Disable automatic updates entirely or for the package that you want to downgrade.

How to downgrade

  1. Log into your Synology via SSH as an administrative user.
  2. Go to package directory
    Navigate to /var/packages/ and find the directory of your package, that has a dependency on the package to downgrade, in my case: OpenERP in /var/packages/OpenERP7.x
  3. Backup the INFO file
  4. Open the INFO file with vim and find the dependency-line, in my case:
    install_dep_packages="PythonModule"
    remove the line and save the file.
  5. Repeat step 4 for all packages, that depend on your packge to downgrade.
  6. Open the Package Center in your web browser and uninstall the package to downgrade, in my case Python Modules
  7. Install the old version of your package via Package Center or via SSH synopkg install <package-file>.spk
  8. Replace the modified INFO file with your backup, or insert the removed line yourself.
  9. Start the failed package via Package Center.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment