Skip to content

Instantly share code, notes, and snippets.

@reubenmiller
Last active October 22, 2024 07:03
Show Gist options
  • Select an option

  • Save reubenmiller/db63ccd7092b1ff09f90ce19c777d9de to your computer and use it in GitHub Desktop.

Select an option

Save reubenmiller/db63ccd7092b1ff09f90ce19c777d9de to your computer and use it in GitHub Desktop.
Only install specific thin-edge.io version

To install a specific version of thin-edge.io on a Debian based operating system, you will have to use APT Package Pinning, as the tedge-full package is a virtual package, and installing a specific version of the virtual package does not transfer to the package's dependencies (unfortunately).

Below shows how the exact thin-edge.io version can be installed.

  1. Create a debian package pin definition for thin-edge.io

    Create the following file:

    sudo vi /etc/apt/preferences.d/tedge

    And add the following contents to the file:

    Package: tedge-full
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: tedge
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: tedge-mapper
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: tedge-agent
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: c8y-firmware-plugin
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: c8y-remote-access-plugin
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: tedge-apt-plugin
    Pin: version 1.2.0
    Pin-Priority: 1001
    
    Package: tedge-watchdog
    Pin: version 1.2.0
    Pin-Priority: 1001
    
  2. Update the apt cache

    sudo apt-get update
  3. Install thin-edge.io

    sudo apt-get install tedge-full

    Note

    If thin-edge.io was previously installed, then you will have to manually restart the tedge-agent service as it is not automatically restarted when manually installed (but it is when installed via the cloud)

    sudo systemctl restart tedge-agent

Note

  • If you want to remove the package pinning just delete the file created in the above procedure

    sudo rm /etc/apt/preferences.d/tedge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment