How to check all software versions on a server (and when each one reaches end of life)
By Brandon Sheley, IT administrator and web developer · updated
Start with the operating system, then list the installed packages, then ask each runtime and service for its version. Containers need their own check. When you have the list, paste it into Check my stack to see every end-of-life date at once, or look each product up on its vendor's lifecycle page.
Everything below works over SSH or a remote PowerShell session, and nothing needs to be installed first.
Step 1: Find the operating system version
The OS is the first thing to check, because it sets the support date for everything installed from its package repositories.
| System | Command | What you get |
|---|---|---|
| Any Linux | cat /etc/os-release | Distribution and version, like VERSION_ID="24.04" |
| Ubuntu, Debian | lsb_release -a | The same, plus the codename |
| Any Linux (kernel) | uname -r | Kernel version, like 6.8.0-45-generic |
| Windows, Windows Server | winver | A window with the version and build |
| Windows (PowerShell) | Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version | Microsoft Windows Server 2022 Standard, 10.0.20348 |
| Windows feature update | (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').DisplayVersion | 24H2, 23H2 and so on |
| macOS | sw_vers | Version and build |
The Windows build number (10.0.20348, 10.0.26100) is the most precise answer: Windows 10, Windows 11 and Windows Server all report "10.0", and the build tells them apart. The Windows and Windows Server pages accept build numbers in the version check.
Step 2: List every installed package
Package managers know about everything they installed. Send the list to a file so you can search it or compare it later.
| System | List installed | List what has updates waiting |
|---|---|---|
| Ubuntu, Debian | apt list --installed | sudo apt update && apt list --upgradable |
| RHEL, Rocky, AlmaLinux, Fedora | dnf list installed | dnf check-update |
| Older RHEL and CentOS | rpm -qa | sort | yum check-update |
| Alpine | apk info -v | apk version -l '<' |
| Arch | pacman -Q | pacman -Qu |
| SUSE | zypper search --installed-only | zypper list-updates |
| Windows 10, 11, Server 2025 (Desktop Experience) | winget list | winget upgrade |
| macOS (Homebrew) | brew list --versions | brew outdated |
For example, apt list --installed > packages.txt saves the whole list. On a typical server it runs to hundreds of lines, mostly libraries. You don't need to look up each one: the libraries are covered by the distribution's support, so the OS date covers them.
Windows without winget
Windows Server 2016, 2019 and 2022 don't ship with winget. The registry's uninstall keys list the same programs that Settings → Apps shows, for both 64-bit and 32-bit software:
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*,
HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object DisplayName |
Select-Object DisplayName, DisplayVersion, Publisher |
Sort-Object DisplayName
Add | Export-Csv installed.csv -NoTypeInformation to the end to save it as a spreadsheet. For a fleet of machines, an RMM or inventory tool collects the same data on a schedule.
Step 3: Check the runtimes and services that matter
The package list says what's installed. These commands ask the software itself, which also catches anything installed by hand, from a vendor repository or by a control panel.
| Software | Command | Watch out for |
|---|---|---|
| PHP | php -v | The command line and the website can run different PHP versions. On shared hosting, check the version in the hosting panel or a phpinfo() page. |
| nginx | nginx -v | Prints to stderr, which only matters in scripts. |
| Apache | apache2 -v (Debian, Ubuntu) or httpd -v (RHEL family) | |
| MySQL / MariaDB | mysql -e "SELECT VERSION();" | mysql --version shows the client, which can differ from the server. |
| PostgreSQL | psql -c "SHOW server_version;" | Same: psql --version is the client. |
| Redis | redis-server --version | |
| Node.js | node --version | Version managers like nvm can give each user a different version. |
| Python | python3 --version | Apps often run in a virtual environment with their own Python. |
| Java | java -version | |
| OpenSSL | openssl version | |
| Docker Engine | docker version | The Server section is the engine version. |
| SQL Server | SELECT @@VERSION; |
There are commands for more than 200 other tools on the how to check your version page.
Step 4: Don't forget containers
Software in a container doesn't show up in the host's package list. List what's running and which image each container uses:
docker ps --format '{{.Names}}\t{{.Image}}'
A tag like postgres:16 tells you the version. A tag like latest doesn't, so ask the app inside the container instead, and check the image's own OS too:
docker exec CONTAINER psql --version
docker exec CONTAINER cat /etc/os-release
Many images also record their version in a label: docker inspect --format '{{index .Config.Labels "org.opencontainers.image.version"}}' CONTAINER. To be told when newer images come out, see tools to track software versions and Docker image updates.
Step 5: Put it all in one list
This script prints one product version line for each thing it finds on a Linux server. It only reads version numbers; it doesn't change anything. Save it as stack.sh, read it, then run sh stack.sh.
#!/bin/sh
# Print "product version" lines to paste into https://latestat.com/stack
have() { command -v "$1" >/dev/null 2>&1; }
. /etc/os-release && echo "$ID $VERSION_ID"
echo "linux $(uname -r | cut -d- -f1)"
have php && php -r 'echo "php ", PHP_VERSION, "\n";'
have nginx && nginx -v 2>&1 | sed 's#.*nginx/\([0-9.]*\).*#nginx \1#'
have apache2 && apache2 -v | sed -n 's#.*Apache/\([0-9.]*\).*#apache \1#p'
have httpd && httpd -v | sed -n 's#.*Apache/\([0-9.]*\).*#apache \1#p'
have mysql && mysql --version | grep -o '[0-9.]*-MariaDB' | sed 's/-MariaDB//; s/^/mariadb /'
have mysql && mysql --version | grep -v MariaDB | grep -o 'Ver [0-9.]*' | sed 's/Ver /mysql /'
have psql && psql --version | awk '{print "postgresql", $3}'
have redis-server && redis-server --version | grep -o 'v=[0-9.]*' | sed 's/v=/redis /'
have node && node --version | sed 's/^v/nodejs /'
have python3 && python3 -c 'import platform; print("python", platform.python_version())'
have openssl && openssl version | awk '{print "openssl", $2}'
have docker && v=$(docker version --format '{{.Server.Version}}' 2>/dev/null) && [ -n "$v" ] && echo "docker $v"
exit 0
On Windows, this PowerShell does the same for the OS and PowerShell itself:
$os = Get-CimInstance Win32_OperatingSystem
$name = if ($os.ProductType -eq 1) { 'windows' } else { 'windows-server' }
"$name $($os.Version)"
$ps = if ($PSVersionTable.PSEdition -eq 'Core') { 'powershell' } else { 'windows-powershell' }
"$ps $($PSVersionTable.PSVersion)"
The database lines use the client version. If the server is on another machine or a different version, replace them with the SELECT VERSION(); result.
Step 6: Check the end-of-life date for each one
An end-of-life date is the day a version stops getting fixes, security fixes included. (More on what end of life means.) There are three ways to find them:
- The vendor's lifecycle page. Most publish one: PHP's supported versions ↗, Ubuntu's release cycle ↗, Microsoft's lifecycle search ↗ and Node.js releases ↗. It's the final word, but it's one product at a time, and every vendor lays it out differently.
- One page per product here. Every product page on latestat.com, like /php or /ubuntu, lists each branch's end-of-life date, and the "Am I up to date?" box checks your exact version.
- Everything at once. Paste your list, or the script's output, into Check my stack. It checks every line, grades the whole stack from A to F, and gives you a link to share and a calendar feed with just your dates.
Distribution packages follow the distribution's dates
Software installed from your distribution's repositories is supported by the distribution, not just the original project. Ubuntu 22.04 ships PHP 8.1, for example. PHP 8.1 reached its own end of life on December 31, 2025, but Canonical keeps patching Ubuntu's PHP 8.1 package for as long as Ubuntu 22.04 itself is supported. So php 8.1 on that server shows as end of life upstream, while the OS date is the one that really applies. On Ubuntu, pro security-status shows which installed packages get security updates and from where. If you installed a newer version from a third-party repository (a PPA, a vendor repo), the upstream date applies instead.
Step 7: Keep checking without remembering to
- Calendar: subscribe to every end-of-life date, one product's dates (like PHP's), or the feed for your own stack from Check my stack.
- From a terminal:
curl latestat.com/phpprints the latest version and the end-of-life dates as plain text. - On a schedule: a cron job or CI pipeline can call the free API and fail or alert when something reaches end of life. There are ready-made scripts and a GitHub Action in the examples.
- Next year's deadlines: the end-of-life budget planner lists them by quarter.
Questions people ask
How do I see every program installed on a Linux server?
Use the package manager: apt list --installed on Debian and Ubuntu, dnf list installed on RHEL, Rocky, AlmaLinux and Fedora, apk info -v on Alpine. Software installed by hand, in containers, or by version managers like nvm won't be in that list, so check those separately.
How do I check software versions on Windows Server?
Run winget list on Windows Server 2025. On older versions, read the registry's uninstall keys with PowerShell (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* plus the WOW6432Node key for 32-bit programs). For the OS itself, Get-CimInstance Win32_OperatingSystem shows the edition and build number.
How do I find out when software reaches end of life?
Check the vendor's lifecycle page, or the product's page on latestat.com, which lists every branch's end-of-life date. To check many products at once, paste "product version" lines into latestat.com/stack.
Is a package from my Linux distribution end of life when the upstream version is?
Not necessarily. Distributions like Ubuntu, Debian and RHEL keep patching the versions they ship for the life of the release, so the distribution's own end-of-life date is the one that applies. Packages from third-party repositories follow the upstream project's dates.
How often should I check?
Before each patch cycle at the least, and whenever you plan budgets or projects. A calendar feed of end-of-life dates means the reminders come to you.