How to fix E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start in APT
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- Increase cache limit temporarily
- Permanently increase cache limit
- Alternative: Increase Cache-Start value
- Review and clean up repositories
sudo apt-get update -o APT::Cache-Limit=100000000E: 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
- 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
- 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"
Run apt update with an increased cache limit to verify the fix works:
sudo apt-get update -o APT::Cache-Limit=100000000This sets the cache limit to 100MB for this single command. If update succeeds, your issue is confirmed and you can proceed to permanent fix.
Edit the apt configuration file to make the cache limit increase permanent:
sudo nano /etc/apt/apt.conf.d/70debconfAdd this line at the end of the file:
APT::Cache-Limit "100000000";Save the file (Ctrl+O, Enter, Ctrl+X) and run:
sudo apt-get updateIf the file doesn't exist, create a new configuration file:
sudo nano /etc/apt/apt.conf.d/99cache-limitAdd the same line above and save.
If the above doesn't resolve the issue, increase the initial cache allocation:
sudo nano /etc/apt/apt.conf.d/70debconfAdd or modify these lines:
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.
Identify if you have unnecessary repositories consuming cache space:
sudo add-apt-repository --listRemove any duplicate mirrors or unused repositories:
sudo add-apt-repository --remove ppa:repository/nameRemove 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
- ๐APT Official Documentation
- ๐Debian Manpages - apt.conf(5)(Official Docs)
- ๐
- ๐
- ๐
- ๐