Title: Size in loc of common software Author: Alessandro Mauri # Size in loc of common software Bloat is everywhere, in 2018 I started my journey on debloating my digital life, so far I mostly use linux as my main OS (the mostly is due to uni stuff I don't want and/or have time to deal with), I don't use a desktop environment, got rid of systemd, pulseaudio and polkit just to name a few. I could go on about how I debloated most of my computing life but that is not the goal of this article, that is I recently started to wonder: how much bloat is really there? In order to answer that question I rolled up my sleeves and with the mighty power of post-its, git and [scc][1] I cloned the repositories of many common programs in order to check their bloat suckless style, with lines of code. Let's get to the data. **UPDATE**: I changed the method for counting lines of code, that is I changed utility from [scc][1] to [cloc][2]. The reason behind this is that [cloc][2] allows to exclude a list of languages from the code count, that way I can count only the lines that matter excluding stuff like documentation and so on. So entries marked with *"x"* mean that they were re-counted using the following command (that's a big command): ```sh $ cloc --exclude-lang='make,m4,YAML,SVG,CMake,DTD,Markdown,CSS,\ Meson,diff,Dockerfile,NAnt script,HTML,TeX,PO File,reStructuredText,\ vim script,AsciiDoc' ``` ## Init systems | Name | loc | | ----------- | --------- | | systemd | 566K | x | OpenRC | 14K | x | s6 | 10K | x | runit | 6.2K | x | sysVinit | 8.7K | x ## Logging daemons Technically systemd includes its own logging daemon but here is omitted. | Name | loc | | ----------- | --------- | | rsyslog | 152K | x | socklog | 3.7K | x | metalog | 1.9K | x ## Network Generic network management programs. | Name | loc | | --------------- | --------- | | wpa_supplicant | 529K | x | kea | 454K | x | NetworkManager | 413K | x | ModemManager | 192K | x | connman | 98K | x | iwd | 85K | x | dhcpcd | 38K | x ## Music players | Name | loc | | ----------- | --------- | | mpd | 93K | x | cmus | 40K | x | mocp | 35K | x | ncmpcpp | 23K | x | herrie | 7.1K | x ## Cron daemons | Name | loc | | ----------- | --------- | | fcron | 12K | x | cronie | 7.5K | x | dcron | 2.1K | x | scron | 1.0K | x | tinycron | 117 | x ## Text editors Don't tell me you saw that one coming. | Name | loc | | ----------- | --------- | | vim | 667K | x | neovim | 550K | x | vis | 32K | x | kakoune | 30K | x | micro | 27K | x | nano | 16K | x ## Build systems | Name | loc | | ----------- | --------- | | cmake | 774K | x | tup | 243K | x | meson | 68K | x | GNU make | 31K | x | ninja | 18K | x | samurai | 3.3K | x ## Shells (POSIX or not) | Name | loc | | ----------- | --------- | | bash | 161K | x | fish | 157K | x | zsh | 115K | x | ksh93 | 72K | x | tcsh | 65K | x | mksh | 30K | x | ash | 12K | x | dash | 13K | x ## Boot loaders/managers | Name | loc | | ----------- | --------- | | CloverBoot | 1.7M | x | GRUB | 281K | x | syslinux | 222K | x | reEFInd | 27K | x | LILO | 24K | x ## Display servers Dependencies are counted two levels "deep" excluding duplicates, from the alpine linux x86_64 package repositories.\ U: Not built, protocol code not generated B: Code generated | Name | loc | dependencies | | ------------------- | --------------- | ------------ | | xorg-server | 422K | 44 | | - | - | - | | wayland + | | | | wayland-protocols + | | | | wlroots | U: 97K, B:268K | 27 | ## SSH servers/clients | Name | loc | | ----------- | --------- | | dropbear | 101K | x | OpenSSH | 123K | x | TinySSH | 13K | x ## Terminal multiplexers | Name | loc | | ----------- | --------- | | tmux | 57K | x | GNU screen | 32K | x | dvtm | 4.1K | x ## Terminal emulators | Name | loc | | ----------- | --------- | | kitty | 174K | x | alacritty | 18K | x | wayst | 31K | x | havoc | 10K | x | wterm | 10K | x | st | 4.3K | x ## Kernels | Name | loc | | ------------ | --------- | | netbsd | 32M | x | linux | 19M | x | FreeBSD | 16M | x | OpenBSD | 15M | x | DragonflyBSD | 887K | x ## Permission managers | Name | loc | | ----------- | --------- | | sudo | 140K | x | polkit | 22K | x | OpenDoas | 2.8K | x | PAM | 60K | x ## Compilers | Name | loc | | ----------- | --------- | | gcc | 9.0M | | llvm | 8.0M | | zig | 2.1M | | rust | 801K | x | tcc | 93K | ## Torrent clients | Name | loc | | ------------- | --------- | | qBittorrent | 743K | x | transmission | 282K | x | deluge | 118K | x | rtorrent | 22K | x ## Web browsers Does not include libraries, only the main repos. | Name | loc | | ----------- | --------- | | chromium | too large | | Firefox | 19M | x | SeaMonkey | 17M | x | Webkit | 12M | x | qutebrowser | 92K | x | min | 20K | x | vimb | 9.4K | x | Lynx | 177K | x | links | 166K | x | dillo | 66K | x | badwolf | 1.8K | ## Window managers | Name | loc | | ----------- | --------- | | awesome | 65K | x | i3 | 44K | x | openbox | 40K | x | bspwm | 12K | x | 2bwm | 3.3K | | dwm | 2.5K | ## Audio systems ### ALSA | Name | loc | | ------------- | --------- | | alsa-firmware | 133K | x | alsa-lib | 93K | x | alsa-tools | 43K | x | alsa-utils | 36K | x | alsa-plugins | 12K | x | alsa-oss | 4.0K | x ## Wayland compositors | Name | loc | | ----------- | --------- | | weston | 117K | | sway | 42K | | wayfire | 27K | | hikari | 15K | | river | 5.9K | ## Application launchers | Name | loc | | ------------- | --------- | | rofi | 20K | x | bemenu | 5.3K | x | wofi | 3.6K | x | nwg-launchers | 2.2K | x | dmenu | 1.2K | x ## Device managers NOTE: mdev is only one source file, so loc count doesn't include anything but that file. | Name | loc | | ----------- | --------- | | eudev | 27K | x | mdevd | 1.6K | x | smdev | 697 | x | mdev | 751 | ## Initramfs generators | Name | loc | | ----------- | --------- | | dracut | 28K | x | tinyramfs | 448 | x ## Code counters | Name | loc | | ----------- | --------- | | scc | 41K | x | tokei | 5.7K | x ## Package managers | Name | loc | | ----------- | --------- | | apt | 98K | x | xbps | 40K | x | pacman | 28K | x | apk | 17K | x | kiss | 1.0K | x ## Webservers | Name | loc | | ----------- | --------- | | apache | 419K | | nginx | 144K | x | hiawatha | 105K | x | lighttpd | 70K | x | caddy | 27K | x ## Syncronization and backup programs | Name | loc | | ----------- | --------- | | borg | 86K | x | syncthing | 129K | x | git-annex | 77K | x | rsync | 51K | x | restic | 43K | x | casync | 31K | x ## Others Stuff that doesn't fit any other category (for now) | Name | loc | | ----------- | --------- | | openssl | 642K | x | bluez | 373K | x | libressl | 374K | x | elogind | 137K | x | dbus | 115K | x | tint2 | 33K | x | lowdown | 15K | x | pass | 2.8K | x [1]: https://github.com/boyter/scc [2]: https://github.com/AlDanial/cloc