This tiny flow will use the apt package manager. It firstly updates the currently available package list and then reports back which packages can be upgraded along with some details.
Last active
August 23, 2026 11:28
-
-
Save TotallyInformation/946bbb25d28004a1731c7db57e5de70b to your computer and use it in GitHub Desktop.
Get structured list of upgradable Debian Linux packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": "29a3a599db731b04", | |
| "type": "group", | |
| "z": "ef122f0d.d488b", | |
| "name": "List upgradable APT packages", | |
| "style": { | |
| "label": true | |
| }, | |
| "nodes": [ | |
| "3b911ea74aad29e7", | |
| "5e2a54e15d8d7698", | |
| "4b8ece50ee98bd5d", | |
| "df595cc8be4d8916", | |
| "c3941a8f0dc89196" | |
| ], | |
| "x": 24, | |
| "y": 151.5, | |
| "w": 882, | |
| "h": 97 | |
| }, | |
| { | |
| "id": "3b911ea74aad29e7", | |
| "type": "exec", | |
| "z": "ef122f0d.d488b", | |
| "g": "29a3a599db731b04", | |
| "command": "sudo /usr/bin/apt update", | |
| "addpay": "", | |
| "append": "", | |
| "useSpawn": "false", | |
| "timer": "", | |
| "winHide": false, | |
| "oldrc": false, | |
| "name": "apt update", | |
| "x": 290, | |
| "y": 200, | |
| "wires": [ | |
| [ | |
| "5e2a54e15d8d7698" | |
| ], | |
| [], | |
| [] | |
| ] | |
| }, | |
| { | |
| "id": "5e2a54e15d8d7698", | |
| "type": "exec", | |
| "z": "ef122f0d.d488b", | |
| "g": "29a3a599db731b04", | |
| "command": "sudo /usr/bin/apt list --upgradable", | |
| "addpay": "", | |
| "append": "", | |
| "useSpawn": "false", | |
| "timer": "", | |
| "winHide": false, | |
| "oldrc": false, | |
| "name": "apt list upgradable", | |
| "x": 470, | |
| "y": 200, | |
| "wires": [ | |
| [ | |
| "c3941a8f0dc89196" | |
| ], | |
| [], | |
| [] | |
| ] | |
| }, | |
| { | |
| "id": "4b8ece50ee98bd5d", | |
| "type": "inject", | |
| "z": "ef122f0d.d488b", | |
| "g": "29a3a599db731b04", | |
| "name": "apt updatable", | |
| "props": [ | |
| { | |
| "p": "topic", | |
| "vt": "str" | |
| } | |
| ], | |
| "repeat": "", | |
| "crontab": "", | |
| "once": false, | |
| "onceDelay": 0.1, | |
| "topic": "apt updatable", | |
| "x": 140, | |
| "y": 200, | |
| "wires": [ | |
| [ | |
| "3b911ea74aad29e7" | |
| ] | |
| ] | |
| }, | |
| { | |
| "id": "df595cc8be4d8916", | |
| "type": "debug", | |
| "z": "ef122f0d.d488b", | |
| "g": "29a3a599db731b04", | |
| "name": "Output", | |
| "active": true, | |
| "tosidebar": true, | |
| "console": false, | |
| "tostatus": false, | |
| "complete": "payload", | |
| "targetType": "msg", | |
| "statusVal": "", | |
| "statusType": "auto", | |
| "x": 810, | |
| "y": 200, | |
| "wires": [] | |
| }, | |
| { | |
| "id": "c3941a8f0dc89196", | |
| "type": "function", | |
| "z": "ef122f0d.d488b", | |
| "g": "29a3a599db731b04", | |
| "name": "Process output", | |
| "func": "let out = msg.payload.split('\\n')\nout = out.slice(1, -1)\nout.forEach( (item, i) => {\n // node.warn(item.split('/'))\n const [package, detail] = item.split('/')\n const [source, newVersion, platform, , , oldVer] = detail.split(' ')\n out[i] = {\n package,\n newVersion,\n currentVersion: oldVer.replace(']', ''),\n platform,\n source,\n }\n})\nreturn {\n topic: 'Home server upgradable packages',\n payload: out,\n}", | |
| "outputs": 1, | |
| "timeout": 0, | |
| "noerr": 0, | |
| "initialize": "", | |
| "finalize": "", | |
| "libs": [], | |
| "x": 660, | |
| "y": 200, | |
| "wires": [ | |
| [ | |
| "df595cc8be4d8916" | |
| ] | |
| ] | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment