2

I have ubuntu 18.04, trying to upgrade to 18.10 but disk only has 2,8GB free. I see I have 398MB in var/lib/apt/lists which seems really too much.

I ran sudo apt-get clean but it does literally nothing. Also tried BleachBit but the lists are still there.

What is the right way to clean that? Or maybe shouldn't I do that at all?

Thank you!

Chiara

chiarac
  • 51

1 Answers1

0

Don't Delete. These are lists of packages available, if you delete them you won't be able to install anything. Unless you make them again by apt update and then same size of space will be needed.

If you have extra kernels

sudo apt purge $(dpkg -l|egrep 'linux-image-[0-9]|linux-headers-[0-9]'|awk '{print $3,$2}'|grep -v `uname -r|cut -f1,2 -d"-"`|sort -nr|tail -n +4|awk '{ print $2}')

may clear some space.

Vijay
  • 8,556