Archives folder full. How to clean?



I have a problem with my ucs owncloud server. I can’t install update for the server.
I get the error message:

Checking for space on /var/cache/apt/archives: failed

ERROR: Not enough space in /var/cache/apt/archives, need at least 4000 MB.
This may interrupt the update and result in an inconsistent system!
If necessary you can skip this check by setting the value of the
config registry variable update43/checkfilesystems to “no”.
But be aware that this is not recommended!

How do i clean the archives folder?



Please try: apt-get clean


I try that already. But nothing change


Next try: apt-get autoclean

Perhaps this may help: but “autoclean” should do the same and it may be safer than doing it manually.


autoclean is also no success.



Can you show us the output of

df -hT
du -h /var/cache/apt
ls -l /var/cache/apt/archives

best regards


Hello bytemine.
Here is the output where you ask for.

Regards Dave



your root file system, which also hosts /var/cache/apt, is full. You can either:

  1. find out why and free up space by deleting content that isn’t needed anymore; the ncdu utility is very good for this kind of work and can be installed from the unmaintained portion of the repository
  2. add more disks and enlarge the root file system,
  3. add more disks and move portion of the root file system onto a new file system.

Personally I’d prefer to do 1 first and 2 if 1 doesn’t yield enough space. 3 looks easier to do than 2 but poses its own sets of issues.

Kind regards,


You can also check with preinstalled tools like ‘du’,

du -h -d 1 / 2>/dev/null

-d 1 tells du to show only the first level of /, the last part redirects all unwanted error-messages to /dev/null.

best regards



true, of course. The big advantage of ncdu is that it allows you to drill down into the results without having to re-run dh … for a sub-directory. For example, if you see that /var is 40 GB big, you tell ncdu to enter /var and it instantly shows you how big each sub-directory of /var is. If you’re feeling adventurous, you can delete whole directory trees directory from inside ncdu, too.

Kind regards,


Thanks, I let you know if it works.


I can’t install ncdu “disk is full” Do you know solution?


Sure, remove (or temporarily move to some other partition) some stuff you don’t need. ncdu itself isn’t that large; a couple of MB should suffice.


I use the command wget but how do you install it on a another partition. Sorry but I’m new with Linux.


Hi moritz,
Do you still want to help me?

Thanks again



you don’t have to compile the program yourself. You can download the package from the Univention servers, extract it on a partition where there is enough space and use it from there. That would look something like this:

mkdir /boot/tmp
cd /boot/tmp
dpkg-deb -x ncdu_1.12-1+b1_amd64.deb .

Now you can start ncdu like this:

/boot/tmp/usr/bin/ncdu -x /

Note that the download URL and package name are appropriate for UCS 4.3. If you’re still on 4.2, the download URL is this one, and you’ll have to adjust the package name in the dpkg-deb -x … call, too.

Note further that I’m only using /boot here because it is the only permanent file system with enough space left. After making enough space in your root file system you should simply install the ncdu package regularly and remove the copy in /boot:

cd /boot
rm -rf tmp
ucr set repository/online/unmaintained=yes
apt-get update
apt-get install ncdu

Kind regards,


Ok I come so far. But when I want to install the software he gives me an error. I make a screen shot off it.



you’re missing the trailing . as a third argument to dpkg-deb. Read carefully what I’ve written above.



You are my hero. For a few weeks i have this problem. And now it solved. Thanks for your help i appreciate it!


Good to hear! You’re quite welcome.