I've noticed that /var/lib/apt/lists
is HUGE. It's as large as 86MB. Which seems a little too big. Is this normal? If not, what should I do?
3 Answers
When you run sudo apt-get update
(or use the Refresh button in a package manager), a list of packages will get downloaded from the Ubuntu servers. These files are then stored in /var/lib/apt/lists/
.
You can safely remove the contents of that directory as it is recreated when you refresh the package lists. If you remove the files, but do not run apt-get update
to fetch the lists, commands like apt-cache
will fail to provide information (since the cache is empty).
To shrink the directory and speed up fetching package lists, consider disabling some repositories that you do not need (see How to remove a repository?). This includes PPAs (see also How can PPAs be removed?)
If you feel like that, then try with this command:
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
-
1Will this be safe? Do those lists only contain packages that could be installed and not the installed ones? Aug 24, 2012 at 17:25
-
@thabubble yes it is , it will recreate the cache information of your source.there is no harm with this . I am sure .– Raja GAug 24, 2012 at 18:32
-
13
-
After I used sudo rm -rf /var/lib/apt/lists/* I have problems with sudo apt-get update it says: E: The repository 'cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed. Does that mean the lists were not recovered?– Lisa B.Jan 14, 2021 at 10:20
Mine is 142M, so i guess it's normal.
The reason can be because /var/lib/apt/lists/ is the storage area for state information for each package resource specified in sources.list
-
It may be so large. But this is a newly installed system@642MB. Those lists take up almost 1/6 of the space. And that is huge. Aug 24, 2012 at 17:24
-
1642Mb s very small for an Ubuntu installation. My root filesystem (not including any user or data files) is 14Gb. /var/lib/apt/lists is 123Mb. On a second system the values are 5.3Gb and 87Mb, Aug 24, 2012 at 18:12
-
-
4