Sometimes apt installs dependencies of dependencies of ... (and so on) to the deepest required level. So I wonder, are there any packages without any further dependencies or is there a single package at the deepest level of the dependency tree on which all other packages depend?
3 Answers
aptitude search '!~v !?depends(.) !?predepends(.) !?recommends(.) !?suggests(.)'
Should list the non-virtual packages that neither depend on nor pre-depend on nor recommend nor suggest any package.
See Can aptitude group or search for packages which nothing depends on? for the packages that nothing depends on.

- 544,893
I can't say for Debian but in Fedora there are certainly packages which don't depend on anything, e.g. busybox
- it's built statically. I can imagine packages containing nothing but text files - those again may not depend on anything else installed prior. Then there's a kernel - read on.
There's a package called filesystem
- it provides empty directories for a system to be installed in - it's a core package but only the grub2-efi-x64
package directly depends on it.
Almost every package in any Linux distro containing binaries or/and libraries will depend on a C library providing core kernel APIs - it's usually glibc
.
Then, there's the Linux kernel package which contains binaries but it doesn't depend on glibc
because it needs to run the system even when your filesystems are not mounted yet. Does glibc
depend on the filesystem
package? Not really. There are boot loaders which again don't depend on glibc because they need to run early, e.g. GRUB, LiLo or ReFind.
Then you can easily create a library which exports interfaces but it doesn't use C routines, so it won't depend on glibc.
TLDR: there's a lot of variety and not a single package which all others depend on. And there are packages which do not need anything.

- 29,025
Sure, there are.
I just created a short script (quick and dirty) checking this on Debian:
cd /var/lib/apt/lists
while read -r x; do
[[ ${y} == Package* && ${x} != Depend* ]] && echo "${y}"
y="${x}"
done < <( grep -h -E "^(Package|Depends):" *_Packages )
This will list all packages without a dependency.
On my system it found 7591 packages.

- 461
libc6
andlibcrypt1
... – Stephen Kitt May 27 '23 at 07:50libc6
depends onlibcrypt1
which depends onlibc6
. – Stephen Kitt May 27 '23 at 09:39