Fedora 46 Expected to Purge Legacy DNF4 Stack and Modularity
Fedora is preparing to remove both the legacy DNF4 package-manager stack and the modularity feature from the distribution in Fedora 46, according to a report from LWN.net (full report behind LWN's subscriber paywall). The move would close out a migration that began when Fedora 41 shipped DNF5 — a C++ rewrite of the package manager — in October 2024.
The core of the story is not the switch to DNF5, but the delay in retiring DNF4. DNF5 has been the default for more than two years, yet remnants of DNF4 remain embedded not only in the shipped distribution but also in the tooling used to build and release Fedora. That residual infrastructure, rather than any shortage of user appetite for DNF5, is what has kept the old stack alive. Modularity, meanwhile, is slated to disappear alongside it.
The downstream picture matters for enterprise shops. Red Hat confirmed that RHEL 10, released in May 2025, uses DNF5 as its package manager — so the direction of travel from Fedora is mirrored downstream, even though modularity itself has had a more complicated life across the RHEL lineage.
Free sources corroborate the trajectory. Fedora Magazine's Fedora 41 announcement confirmed DNF5 as the default package manager at that release, and the Fedora quick-start documentation for DNF points users toward the DNF5-era tooling. What has been missing is a firm endpoint for the legacy code.
What is changing
For administrators and automation authors, the practical breakage surface is specific:
- The
dnf4binary and the legacy Python API. Any script that imports the olddnfPython module, or that assumes DNF4 command-line behaviour and output formatting, will stop working when the package is dropped. Plug-ins written against DNF4's plug-in interfaces will also fail to load. - Modularity metadata and commands.
modulemdmetadata and thednf modulesubcommands — used to select and switch module streams — will be retired. Repositories that still ship module metadata will need rework.
Third-party repositories, provisioning tooling, container build pipelines, and CI or mirroring jobs that parse DNF4-specific configuration or plug-in formats are the most likely places for silent failures to surface. Auditing those paths ahead of Fedora 46 is the prudent move.
Why modularity is going
Modularity was, in effect, an enterprise-shaped feature whose value accrued mainly to downstream distributions rather than to Fedora itself. Its best-known use case is the module streams introduced with RHEL 8, which allowed parallel versions of stacks such as Node.js and Ruby. Inside Fedora proper, adoption was limited, and the feature carried ongoing maintenance cost in the build and compose infrastructure. Retiring it formalises a retreat that has effectively already been under way.
A caution on timing
Neither the LWN summary nor the corroborating material commits to a final removal schedule or a per-component breakdown; those details are expected to arrive through Fedora's formal change-proposal process. That process has historically been a safety valve: components have been pulled back from release scope when supporting infrastructure was not ready. Administrators should therefore treat "Fedora 46" as the current target rather than a guarantee, and watch the change proposal for confirmation of scope and migration status.
Why it matters here
For enterprise Linux practitioners, including IT professionals in Hong Kong working with Fedora-adjacent toolchains, the practical work is an audit: inventory Python automation built on the dnf module, review provisioning and container pipelines for DNF4 assumptions, and check third-party repositories for modularity metadata. Doing that before the change proposal is finalised leaves more room to adapt.
Glossary - DNF5: A package manager rewritten in C++; the default since Fedora 41. - DNF4: The legacy package manager, set to be removed in Fedora 46. - Modularity: A feature delivering multi-version software stacks through module streams; widely used in RHEL 8 and now being retired. - Change proposal: Fedora's formal review process for adding or removing features, which can affect the final schedule.
Fedora 46 擬移除 DNF4 舊套件管理堆疊與模組化功能
據 LWN.net 報道(全文位於 LWN 付費訂閱牆後),Fedora 正準備在 Fedora 46 中移除舊版 DNF4 套件管理堆疊,以及 modularity(模組化)功能。此舉將為自 Fedora 41 於 2024 年 10 月採用 DNF5——以 C++ 重寫的套件管理器——以來的遷移劃上句號。
這則消息的核心並不在於「改用 DNF5」,而在於「為何拖了這麼久」:DNF5 成為預設已逾兩年,但 DNF4 的殘餘不僅仍存在於發行版本身,也遍布於用於建置與發布 Fedora 的工具鏈中。正是這些殘餘的基礎設施,而非用戶對 DNF5 缺乏意願,使舊有堆疊得以維持至今。Modularity 則將一併退場。
對企業用戶而言,下游動向同樣關鍵。Red Hat 已確認於 2025 年 5 月發布的 RHEL 10 採用 DNF5 作為套件管理器——Fedora 的方向在下游得到呼應,儘管 modularity 本身在 RHEL 系列中的命運更為曲折。
公開來源亦印證了這一趨勢。Fedora Magazine 的 Fedora 41 發布公告確認 DNF5 為該版本的預設套件管理器,Fedora 的 DNF 快速入門文件亦引導用戶使用 DNF5 時代的工具。一直欠缺的,只是一個明確的終點。
有哪些變化
對系統管理員及自動化腳本作者而言,受影響的範圍相當具體:
dnf4指令與舊 Python API。 任何匯入舊dnfPython 模組、或依賴 DNF4 指令列行為及輸出格式的腳本,在該套件移除後都將失效。針對 DNF4 外掛接口編寫的外掛程式亦將無法載入。- Modularity 中繼資料與指令。
modulemd中繼資料及用於選取、切換模組流(module streams)的dnf module子指令將一併退役;仍提供模組中繼資料的軟件庫需要重新處理。
第三方軟件庫、佈建(provisioning)工具、容器建置管線,以及解析 DNF4 專屬設定或外掛格式的 CI 或鏡像同步作業,最有可能出現難以察覺的失效。在 Fedora 46 到來前審視這些環節,是較穩妥的做法。
為何 Modularity 將退場
Modularity 本質上是一項面向企業的功能,其價值主要落在下游發行版而非 Fedora 本身。最廣為人知的應用,是隨 RHEL 8 推出的模組流,容許 Node.js、Ruby 等技術堆疊並行提供多個版本。在 Fedora 內部,採用率一直有限,而該功能亦為建置與合成(compose)基礎設施帶來持續的維護成本。退場只是把一場早已在進行的撤退正式化。
時程上的提醒
不論 LWN 的摘要還是上述佐證資料,都未承諾最終移除時間表或逐項組件的範圍;相關細節預計將通過 Fedora 正式的變更提案(change proposal)流程公布。該流程歷來充當安全閥:當配套基礎設施未準備妥當時,曾有組件被移出發布範圍。管理員應把「Fedora 46」視為目前的目標而非保證,並留意變更提案以確認範圍及遷移狀態。
對本地讀者的意義
對企業 Linux 從業者,包括在香港接觸 Fedora 相關工具鏈的 IT 專業人士而言,當務之急是一次盤點:清查建立在 dnf 模組上的 Python 自動化腳本、檢查佈建與容器管線中的 DNF4 假設,並查看第三方軟件庫是否仍帶有 modularity 中繼資料。在變更提案定案前完成這些工作,日後調整的空間更大。
術語 Glossary(繁體中文) - DNF5:以 C++ 重寫的套件管理器,自 Fedora 41 起為預設。 - DNF4:舊版套件管理器,將於 Fedora 46 移除。 - Modularity(模組化):透過「模組流 (module streams)」提供多版本軟體堆疊的功能,RHEL 8 曾廣泛使用,將一併退場。 - Change proposal(變更提案):Fedora 正式評審新功能或移除功能的流程,可影響最終時程。
