How to fix E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start in APT

APTINTERMEDIATEMEDIUMUpdated Dec 29, 2025ยท 176 views

The APT package manager cache is too small for your configured repositories. Increase the cache limit in apt configuration to resolve this error.

Quick fix

Fixes E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start

sudo apt-get update -o APT::Cache-Limit=100000000
  1. Increase cache limit temporarily
  2. Permanently increase cache limit
  3. Alternative: Increase Cache-Start value
  4. Review and clean up repositories
apt โ€” error
sudo apt-get update -o APT::Cache-Limit=100000000
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start

What this error means

This error occurs when APT's memory-mapped (mmap) cache fills up while processing package metadata from your configured repositories. APT uses a resizable cache to store information about available packages, but it has a default size limit to prevent excessive memory usage on low-resource systems. When the total number of packages across all your repositories exceeds this limit, APT cannot load the complete package database and fails with this error.

Typical symptoms

  • apt update fails with "Dynamic MMap ran out of room" error
  • apt-get install commands fail to proceed
  • Package management tools like synaptic or GNOME Software become unstable
  • Error occurs after adding new repositories or updating sources

Common causes

  1. Too many repositories configured in sources.list and sources.list.d/
  2. Repositories contain a large number of packages
  3. Default cache limit (typically 25MB) is too small for your system configuration
  4. Adding multiple mirrors or duplicate repositories increases the package count

How to fix "E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start"

1Increase cache limit temporarily

Run apt update with an increased cache limit to verify the fix works:

bash
sudo apt-get update -o APT::Cache-Limit=100000000

This sets the cache limit to 100MB for this single command. If update succeeds, your issue is confirmed and you can proceed to permanent fix.

2Permanently increase cache limit

Edit the apt configuration file to make the cache limit increase permanent:

bash
sudo nano /etc/apt/apt.conf.d/70debconf

Add this line at the end of the file:

bash
APT::Cache-Limit "100000000";

Save the file (Ctrl+O, Enter, Ctrl+X) and run:

bash
sudo apt-get update

If the file doesn't exist, create a new configuration file:

bash
sudo nano /etc/apt/apt.conf.d/99cache-limit

Add the same line above and save.

3Alternative: Increase Cache-Start value

If the above doesn't resolve the issue, increase the initial cache allocation:

bash
sudo nano /etc/apt/apt.conf.d/70debconf

Add or modify these lines:

bash
APT::Cache-Start "50000000";
APT::Cache-Grow "2000000";
APT::Cache-Limit "200000000";

These values allocate 50MB initially, grow by 2MB steps, and limit to 200MB maximum.

4Review and clean up repositories

Identify if you have unnecessary repositories consuming cache space:

bash
sudo add-apt-repository --list

Remove any duplicate mirrors or unused repositories:

bash
sudo add-apt-repository --remove ppa:repository/name

Remove third-party PPAs you don't actively use, as they contribute significantly to the package count. Consolidate on stable official repositories when possible.

Advanced notes

APT's cache limit exists to prevent excessive memory consumption on systems with limited RAM or storage. The default Cache-Start is approximately 20MB, Cache-Grow is 1MB per increment, and Cache-Limit defaults to 0 (unlimited growth). On systems with many repositories (e.g., development machines with numerous PPAs), values of 100-200MB are common. On memory-constrained systems (Raspberry Pi, VPS), keep values lower (50MB) and prioritize removing unused repositories. If you still encounter issues after increasing the limit, it indicates you have too many repositories; in this case, review and remove overlapping or unnecessary third-party package sources.

Frequently asked questions

What does "E: Dynamic MMap ran out of room. Please increase the size of APT::Cach" mean?
This error occurs when APT's memory-mapped (mmap) cache fills up while processing package metadata from your configured repositories. APT uses a resizable cache to store information about available packages, but it has a default size limit to prevent excessive memory usage on low-resource systems. When the total number of packages across all your repositories exceeds this limit, APT cannot load the complete package database and fails with this error.
How do I fix "E: Dynamic MMap ran out of room. Please increase the size of APT::Cach"?
The APT package manager cache is too small for your configured repositories. Increase the cache limit in apt configuration to resolve this error.
What causes "E: Dynamic MMap ran out of room. Please increase the size of APT::Cach"?
Too many repositories configured in sources.list and sources.list.d/ Repositories contain a large number of packages Default cache limit (typically 25MB) is too small for your system configuration
Is the "E: Dynamic MMap ran out of room. Please increase the size of APT::Cach" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading