Runs apt dist-upgrade on one server, upgrading every installed package, Ubuntu packages included, to the newest version its repositories offer. Requires Super User scope. Run POST /apt/update/{hostname} first so apt knows the newest versions; to upgrade chosen packages only, use POST /apt/install/{hostname}.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params
Query Params
Header Params
Body Params application/json
Examples
Responses
🟢200OK
text/plain
apt output as plain text, streamed while the command runs. The connection stays open until apt finishes, which can take several minutes. The text starts with an Executing command: line and ends with Command executed successfully with exit code: 0 or Command failed with exit code: <n>. Both lines carry ANSI color codes. A failed apt run still answers 200, so read the last line, not the status code. If another apt operation holds the apt lock, the request waits up to 20 minutes for it, then answers 409 instead of streaming. When a package restarts the web server or the apt manager, that restart waits until the response has finished, so the stream is not cut off.
Executing command: sudo apt dist-upgrade -y
Hit:1 https://aptng.example.com/aptng/netsapiens/v46.0 noble InRelease
Reading package lists...
Building dependency tree...
All packages are up to date.
Command executed successfully with exit code: 0