Does Ubuntu Server have any special preinstalled packages
As it turns out each Ubuntu release has a .manifest
file associated with it on its downloads page which, according to this question, lists the preinstalled packages. However, there are comments in the same source saying that it's the list of the live CD packages. As that is the closest answer I got, I compared the manifest files of Ubuntu Server 20.04 and Ubuntu Desktop 20.04. There are indeed a few packages which are present in Ubuntu server but not in the Desktop such as screen, tmux, eatmydata, curl and a bunch of python packages. Some packages have different versions. Nothing big is preinstalled though. Here is a link to the diff.
I might have misread your question initially, since you are asking about "preinstalled". My answer is more in the line of "what can be removed" and then "what can be installed".
By default, Ubuntu server is pretty minimal, and you normally shouldn't have to remove anything. However, there are a few packages and snaps that are safe to remove, but this is not really documented anywhere.
For reference, I consider the following packages safe to remove under all circumstances: (unless you really need them - I have removed all those on my server)
- lxd-agent-loader
- cloud-init
- byobu
- vim
- xfsprogs
- xauth (probably needed if you want a GUI)
One "official" place to get a list of packages available during installation (but not preinstalled unless you choose to) is the "Using the installer step by step" guide for Ubuntu Server.
In this guide you'll find this image, which shows packages that you are presented for during installation: (which also means these are not preinstalled, unless you choose to)
And now for the caveat: Since 20.04, these are all Snap packages. It seems Canonical are indeed pushing snaps in front of regular .deb
packages.
However, to get an overview of available packages you can install afterwards (which are not snaps), you can consult the official Ubuntu Server Guide. This guide has installation instructions for many useful server applications and utilites, which you can find by navigating the left-hand menu.
Finally, for installing a desktop environment on a server, I find this existing answer most useful.