ArieM
Posts: 3
Joined: Sun Apr 07, 2013 11:38 pm

E: You don't have enough free space in /var/cache/apt/archiv

Sun Apr 07, 2013 11:44 pm

I cannot seem to figure out the solution to this error message. After doing:

Code: Select all

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get upgrade
I get this error message:

Code: Select all

Need to get 265 MB of archives.
After this operation, 16.4 MB disk space will be freed.
E: You don't have enough free space in /var/cache/apt/archives/.
Any suggestions?
I am on a 16Gb SD card. I also ran some commands for data you may want in order to help with this problem.

Code: Select all

root@raspberrypi:/home/pi# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          1.8G  1.7G  4.9M 100% /
/dev/root       1.8G  1.7G  4.9M 100% /
devtmpfs         85M     0   85M   0% /dev
tmpfs            19M  244K   19M   2% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            37M     0   37M   0% /tmp
tmpfs            37M     0   37M   0% /run/shm
/dev/mmcblk0p1   56M   23M   34M  41% /boot
root@raspberrypi:/home/pi# sudo du -h /var/backups
4.0K    /var/backups
root@raspberrypi:/home/pi# sudo fdisk -l

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00016187

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     3788799     1832960   83  Linux
/dev/mmcblk0p3         3788800     7694335     1952768   83  Linux

Thanks much for assistance!
Arie

DirkS
Posts: 10711
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 1:21 am

Code: Select all

root@raspberrypi:/home/pi# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          1.8G  1.7G  4.9M 100% /
/dev/root       1.8G  1.7G  4.9M 100% /
Your disk (well, partition actually) is full...

The rootfs is only 1.8GB. Normally I would say you'd have to use the option 'expand_rootfs' in raspi-config, but your setup is not quite standard (3 partitions instead of one):

Code: Select all

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     3788799     1832960   83  Linux
/dev/mmcblk0p3         3788800     7694335     1952768   83  Linux
There are 2 linux partitions (about the same size). Are you using BerryBoot to switch between 2 distros?

In total you're only using about 4GB of the available 16GB on your SD card (hope I got my maths right).
Not sure what the easiest way is to enlarge the partitions in your situation. If you have another Linux computer you could use gparted to move and resize the partitions. Otherwise you could use a gparted live cd.
NB: if you try to try something like that it's best to make a backup image of the SD card first.

Gr.
Dirk.

ArieM
Posts: 3
Joined: Sun Apr 07, 2013 11:38 pm

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 2:29 am

Dirk,

The third partition, the slightly largest of all three, was created by me just today, in an attempt to fix the problem. But, I suggest that the initial image of Rasbian was two partitions, is that not normal?
Because, I never did it, I didn't know how until today.

I'll remove the third partition, which is empty.
But, suggestions on the other two?

Thanks,
Arie

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 2:51 am

remove the third, then run raspi_config and use the expand root-fs option
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

ArieM
Posts: 3
Joined: Sun Apr 07, 2013 11:38 pm

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 3:01 am

Dirk and SirLagz,

I cannot believe it was this easy. Unbelievable the hours I spent trying to figure this out.

Code: Select all

umount /dev/mmcblk0p3
raspi-config
and expand root-fs, as you both mentioned.

Thanks so much!
(Duh!! -- what I could have done with those hours heheh)

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 3:04 am

No problems !
Chalk the hours up to your learning experience tally haha.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

DirkS
Posts: 10711
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: E: You don't have enough free space in /var/cache/apt/ar

Mon Apr 08, 2013 9:06 am

SirLagz wrote:Chalk the hours up to your learning experience tally haha.
Yes, that's what I would do :D

Gr
Dirk.

geeks
Posts: 3
Joined: Thu Jan 29, 2015 8:00 pm

Re: E: You don't have enough free space in /var/cache/apt/ar

Thu Jan 29, 2015 8:20 pm

how can I make more space.. ? I have an 8GB sdcard but after installing kate and apache, it is full...


pi@pi /var/cache $ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3023728 2862316 0 100% /
/dev/root 3023728 2862316 0 100% /
devtmpfs 219744 0 219744 0% /dev
tmpfs 44784 216 44568 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 89560 0 89560 0% /run/shm
/dev/mmcblk0p1 57288 9920 47368 18% /boot
tmpfs 89560 4 89556 1% /tmp
pi@pi /var/cache $ df

DirkS
Posts: 10711
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: E: You don't have enough free space in /var/cache/apt/ar

Thu Jan 29, 2015 9:12 pm

run raspi-config and expand the rootfs

geeks
Posts: 3
Joined: Thu Jan 29, 2015 8:00 pm

Re: E: You don't have enough free space in /var/cache/apt/ar

Thu Jan 29, 2015 9:40 pm

big difference, now it is 41% instead of 100%, thanks a lot!


rootfs 7572168 2899988 4314268 41% /
/dev/root 7572168 2899988 4314268 41% /

Chrizis
Posts: 1
Joined: Fri Aug 23, 2019 2:57 pm

Re: E: You don't have enough free space in /var/cache/apt/archiv

Fri Aug 23, 2019 2:58 pm

I installed Kali linux on the raspberry pi and had trouble with the storage and this resolved it!

Thank you so much!!

ChasL001
Posts: 3
Joined: Mon Jan 27, 2020 7:50 pm

Re: E: You don't have enough free space in /var/cache/apt/archiv

Fri Jan 31, 2020 2:43 pm

Hi I have a similar problem with the cache full error message after running apt ugrade
Annotation 2020-01-31 142935.jpg
Annotation 2020-01-31 142935.jpg (120.16 KiB) Viewed 11476 times
So I ran raspi-config (note it's - not _ between raspi and config)

I chose 7. Advanced Options then A1 Expand Filesystem but I get the error:
Annotation 2020-01-31 142934.jpg
Annotation 2020-01-31 142934.jpg (34.57 KiB) Viewed 11476 times
Any idea how I can overcome this? or should I just download and remaster a new card? the one I'm using is showing 5.5GiB Free.
Annotation 2020-01-31 142933.jpg
Annotation 2020-01-31 142933.jpg (84 KiB) Viewed 11476 times

Return to “Beginners”