I have been trying to update my xubuntu version but it keep saying there's no enough space on disk. The window says me to execute "sudo apt-get clean" but I have no answer. It just don't do anything. How can I free space on disk if "sudo apt-get clean" is not working??

  • 1
    If you are getting disk full errors when trying to run an apt update, cleaning a bit of space with apt-get autoclean, or indeed any tool, is only going to be a temp measure. Please run df -h from a terminal and post the output as an edit to the question if you want some opinions on the disk space. Oct 28, 2013 at 16:11

3 Answers 3


Doing sudo apt-get clean will remove all the local copy of the packages that you may have downloaded when doing an installation. This will almost empty the /var/cache/apt/archives directory.

But this is not the only place where a lot of space can be wasted, without any importance order:

  • /var/log which contains most of the log for your system. You may want to delete the old logs. You may want also to tweak the configuration of the logrotation program to reduce the amount of logs saved and archived. In the file /etc/logrotate.conf and all the files present under /etc/logrotate.d look for the line beginning by rotation. The number after means how many logs are kept on the system.
  • /tmp, /var/tmp and any other tmp directories found on the system.
  • Your own Trash folder may be full of items that can be purged.
  • Cache of your web browser: usually, in the preferences settings of any web browser, there is a place where you can define the maximum size it can occupy and also to do a purge of it (removing history, old downloaded files, ...)
  • In your home directory, there is a Download folder, maybe it is full of things you don't need anymore and that can be safely deleted.

And these are only the few general things I'm thinking about. Depending on how you use your system (applications installed and so on), there may be some other directories to check and to empty.


If you want to clean more space , you can use bleachbit,:)

you can install it with sudo apt-get install bleachbit and also from software-center.

after installing it , you can launch it from System -> Bleachbit(root) . so that you can clear maximum of useless data.

enter image description here


As is common with many of the commands you can run from a terminal, apt-get clean will only give a response if there is an error.

If the command completes successfully then you will just be returned to the prompt.

hob@hob:~$ sudo apt-get clean
[sudo] password for hob: 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.