Hi there,
Is there a command to output the installed version of DietPi?
And also; is there a similar command to check the latest one available?
I want to add this information to my Home Assistant overview like this:
Thanks!
DietPi version information
Re: DietPi version information
@svh1985
/DietPi/dietpi/.version contains the installed version info. This is sourced to the login bash session, so you can run:
echo "$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC"
From within programs/scripts you either need to source the file as well or use grep/mawk/sed or something similar to scrape the version string.
/DietPi/dietpi/.version contains the installed version info. This is sourced to the login bash session, so you can run:
echo "$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC"
From within programs/scripts you either need to source the file as well or use grep/mawk/sed or something similar to scrape the version string.
Re: DietPi version information
Perfect that works!
And what about getting the latest version that is available to download? I want to create a notification in Home Assistant to notify me when a new version of DietPi is available.
Is this the place where DietPi checks the latest version available:
https://raw.githubusercontent.com/Micha ... _version-6
Thanks!!
And what about getting the latest version that is available to download? I want to create a notification in Home Assistant to notify me when a new version of DietPi is available.

Is this the place where DietPi checks the latest version available:
https://raw.githubusercontent.com/Micha ... _version-6
Thanks!!
Re: DietPi version information
If the update check (dietpi-update 2, runs on boot and as daily cron job, if not disabled via dietpi.txt) will create the file /DietPi/dietpi/.update_available with exactly this version string inside, if an update is available.
And yep, the file you linked is the one that is checked for updates, when you are on master branch (default, stable).
And yep, the file you linked is the one that is checked for updates, when you are on master branch (default, stable).