# The largest C repositories by lines of code

OctoCounts has measured 482 public GitHub repositories whose primary programming language is C. torvalds/linux is the largest, with 32,911,668 code lines across 90,109 files, counted with tokei on November 26, 2026. The table ranks the 50 largest by code lines; each row links to a report pinned to the commit it counted.

| Rank | Repository | Code lines | Total lines | Files | C share |
| --- | --- | --- | --- | --- | --- |
| 1 | [torvalds/linux](https://octocounts.com/github/torvalds/linux) | 32,911,668 | 43,274,152 | 90,109 | 60.5% |
| 2 | [ARARAT33/AWEOS](https://octocounts.com/github/ARARAT33/AWEOS) | 32,336,484 | 42,545,087 | 89,227 | 60.8% |
| 3 | [rockchip-linux/kernel](https://octocounts.com/github/rockchip-linux/kernel) | 28,928,529 | 38,251,015 | 78,827 | 63.2% |
| 4 | [freebsd/freebsd-src](https://octocounts.com/github/freebsd/freebsd-src) | 22,335,858 | 30,875,031 | 74,934 | 44.7% |
| 5 | [Maccraft123/linux-duet](https://octocounts.com/github/Maccraft123/linux-duet) | 21,512,207 | 29,158,515 | 66,268 | 69.1% |
| 6 | [openbsd/src](https://octocounts.com/github/openbsd/src) | 20,789,055 | 28,376,475 | 53,582 | 36.0% |
| 7 | [VirtualBox/virtualbox](https://octocounts.com/github/VirtualBox/virtualbox) | 16,046,794 | 21,998,201 | 42,017 | 28.3% |
| 8 | [DeusData/codebase-memory-mcp](https://octocounts.com/github/DeusData/codebase-memory-mcp) | 14,361,560 | 14,740,184 | 2,746 | 94.8% |
| 9 | [gcc-mirror/gcc](https://octocounts.com/github/gcc-mirror/gcc) | 11,443,129 | 18,835,070 | 145,699 | 27.3% |
| 10 | [LiberNT/LiberNT](https://octocounts.com/github/LiberNT/LiberNT) | 10,931,649 | 14,725,790 | 27,061 | 67.9% |
| 11 | [reactos/reactos](https://octocounts.com/github/reactos/reactos) | 7,917,837 | 11,118,592 | 19,754 | 63.5% |
| 12 | [gnutools/binutils-gdb](https://octocounts.com/github/gnutools/binutils-gdb) | 7,014,976 | 8,923,767 | 35,916 | 36.7% |
| 13 | [TelegramMessenger/Telegram-iOS](https://octocounts.com/github/TelegramMessenger/Telegram-iOS) | 6,741,519 | 8,673,129 | 26,482 | 30.7% |
| 14 | [wireshark/wireshark](https://octocounts.com/github/wireshark/wireshark) | 5,833,167 | 7,287,226 | 5,200 | 82.6% |
| 15 | [vcvkk/Telegram-iOS](https://octocounts.com/github/vcvkk/Telegram-iOS) | 5,661,625 | 7,269,261 | 21,237 | 32.5% |
| 16 | [wine-mirror/wine](https://octocounts.com/github/wine-mirror/wine) | 5,485,803 | 7,489,547 | 8,890 | 56.7% |
| 17 | [meta/hermes](https://octocounts.com/github/meta/hermes) | 5,224,883 | 5,609,674 | 6,757 | 59.4% |
| 18 | [antirez/ds4](https://octocounts.com/github/antirez/ds4) | 5,108,326 | 5,671,181 | 3,140 | 3.2% |
| 19 | [yugabyte/yugabyte-db](https://octocounts.com/github/yugabyte/yugabyte-db) | 4,945,652 | 6,918,721 | 18,563 | 25.4% |
| 20 | [semgrep/semgrep](https://octocounts.com/github/semgrep/semgrep) | 3,872,446 | 4,048,474 | 2,183 | 79.2% |
| 21 | [zephyrproject-rtos/zephyr](https://octocounts.com/github/zephyrproject-rtos/zephyr) | 3,856,866 | 5,485,294 | 35,011 | 57.8% |
| 22 | [wolfSSL/wolfssl](https://octocounts.com/github/wolfSSL/wolfssl) | 3,400,581 | 3,921,751 | 1,933 | 54.6% |
| 23 | [libretro/RetroArch](https://octocounts.com/github/libretro/RetroArch) | 3,013,126 | 3,658,641 | 7,326 | 54.7% |
| 24 | [balloonwj/flamingo](https://octocounts.com/github/balloonwj/flamingo) | 2,869,108 | 3,834,427 | 7,545 | 51.7% |
| 25 | [GNOME/gimp](https://octocounts.com/github/GNOME/gimp) | 2,770,013 | 5,153,421 | 4,370 | 29.9% |
| 26 | [chrissotraidis/peonpad](https://octocounts.com/github/chrissotraidis/peonpad) | 2,658,399 | 3,923,795 | 9,290 | 38.7% |
| 27 | [zabbix/zabbix](https://octocounts.com/github/zabbix/zabbix) | 2,609,872 | 4,957,766 | 4,971 | 15.4% |
| 28 | [videolan/vlc](https://octocounts.com/github/videolan/vlc) | 2,486,792 | 4,868,574 | 4,389 | 17.6% |
| 29 | [alenichev/openbsd-kernel](https://octocounts.com/github/alenichev/openbsd-kernel) | 2,183,806 | 3,051,354 | 7,560 | 63.3% |
| 30 | [tsirysndr/rockboxd](https://octocounts.com/github/tsirysndr/rockboxd) | 2,103,426 | 2,742,022 | 7,945 | 48.9% |
| 31 | [0x4E69676874466F78/miranda-ng](https://octocounts.com/github/0x4E69676874466F78/miranda-ng) | 2,064,087 | 3,730,225 | 11,481 | 36.6% |
| 32 | [php/php-src](https://octocounts.com/github/php/php-src) | 1,803,858 | 2,158,909 | 2,819 | 63.0% |
| 33 | [gnutools/glibc](https://octocounts.com/github/gnutools/glibc) | 1,702,628 | 2,487,663 | 18,044 | 45.7% |
| 34 | [python/cpython](https://octocounts.com/github/python/cpython) | 1,656,452 | 2,213,394 | 3,463 | 31.1% |
| 35 | [postgres/postgres](https://octocounts.com/github/postgres/postgres) | 1,638,515 | 2,943,408 | 4,145 | 59.4% |
| 36 | [FFmpeg/FFmpeg](https://octocounts.com/github/FFmpeg/FFmpeg) | 1,601,476 | 2,055,743 | 5,109 | 77.3% |
| 37 | [xeonliu/FFmpeg-AVSPlus](https://octocounts.com/github/xeonliu/FFmpeg-AVSPlus) | 1,504,588 | 1,924,004 | 4,774 | 78.2% |
| 38 | [apple-oss-distributions/xnu](https://octocounts.com/github/apple-oss-distributions/xnu) | 1,411,712 | 2,149,233 | 3,907 | 67.8% |
| 39 | [qemu/qemu](https://octocounts.com/github/qemu/qemu) | 1,386,032 | 1,894,431 | 5,914 | 76.5% |
| 40 | [SanjeevBashyal/OpenFOAM](https://octocounts.com/github/SanjeevBashyal/OpenFOAM) | 1,371,094 | 2,460,172 | 12,727 | 61.2% |
| 41 | [ctrl-cheeb-del/pokeheartgold](https://octocounts.com/github/ctrl-cheeb-del/pokeheartgold) | 1,357,447 | 1,501,270 | 7,045 | 51.6% |
| 42 | [wazuh/wazuh](https://octocounts.com/github/wazuh/wazuh) | 1,329,071 | 1,683,721 | 3,958 | 19.5% |
| 43 | [Kitware/CMake](https://octocounts.com/github/Kitware/CMake) | 1,300,486 | 1,774,919 | 31,504 | 28.8% |
| 44 | [bnunu/halo-1](https://octocounts.com/github/bnunu/halo-1) | 1,196,093 | 1,434,181 | 3,053 | 34.7% |
| 45 | [cuesta4/GOW3rehooked](https://octocounts.com/github/cuesta4/GOW3rehooked) | 1,182,238 | 1,538,074 | 3,120 | 32.7% |
| 46 | [apple/darwin-xnu](https://octocounts.com/github/apple/darwin-xnu) | 1,170,923 | 1,773,145 | 3,307 | 68.3% |
| 47 | [ChupathingyCE/chupathingyce](https://octocounts.com/github/ChupathingyCE/chupathingyce) | 1,170,243 | 1,588,043 | 3,748 | 71.5% |
| 48 | [microsoft/git](https://octocounts.com/github/microsoft/git) | 1,117,285 | 1,566,502 | 3,588 | 27.9% |
| 49 | [systemd/systemd](https://octocounts.com/github/systemd/systemd) | 1,062,342 | 1,792,397 | 4,419 | 70.7% |
| 50 | [ChefKissInc/Inferno](https://octocounts.com/github/ChefKissInc/Inferno) | 1,055,094 | 1,434,898 | 4,027 | 76.4% |

Ranking rule: a repository belongs to C when C is its largest programming language by code lines; data and prose formats such as JSON, YAML, TOML and Markdown do not count as a language for this rule. "C share" is the share of the repository's code lines written in C. Code lines exclude comments and blank lines. Every report uses OctoCounts' canonical public options, with tests, docs and generated directories excluded, and reports were generated on different dates.

## FAQ

### Which C repository has the most lines of code?

torvalds/linux is the largest C repository in OctoCounts' index, with 32,911,668 code lines out of 43,274,152 total lines across 90,109 files, counted on November 26, 2026. ARARAT33/AWEOS follows with 32,336,484 code lines. Code size is not code quality: a larger count only means more source material.

### How does a repository join the C leaderboard?

C must be its primary programming language: the language with the most code lines in the repository's OctoCounts report, ignoring data and prose formats such as JSON, YAML, TOML and Markdown. The repository then needs a public report with at least 5 files, and it is listed when it is among the 50 largest by code lines.

### How many C repositories has OctoCounts measured?

482 public GitHub repositories have C as their primary programming language in OctoCounts' index. This page lists the 50 largest by code lines; a repository analyzed with custom counting options keeps those counts as a separate saved result.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use line counts to gauge the scale of what you would be reading or maintaining, not as a quality signal.

## Curated comparisons in C

- [Neovim vs VS Code: lines of code compared](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL: lines of code compared](https://octocounts.com/compare/mongodb-vs-postgres)

## Related OctoCounts pages

- [The largest codebases by programming language](https://octocounts.com/languages)
- [How OctoCounts counts lines of code](https://octocounts.com/docs/methodology)
- [Hall of Monoliths: largest repositories by lines of code](https://octocounts.com/hall-of-monoliths)
- [How many lines of code? The largest codebases, counted](https://octocounts.com/docs/largest-codebases)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts: count lines of code in any public GitHub repository](https://octocounts.com/)
