Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Scientific Linux. So is there any stuff that can be safely removed from disk except /tmp?

share|improve this question
add comment

5 Answers

up vote 5 down vote accepted

One of the easiest and safest thing to do is to clear the package manager cache. You did not specify which operating system or distribution you use so I will give examples for the mainstream distributions:

  • debian/ubuntu:

    apt-get clean
    
  • fedora/red hat:

    yum clean
    
  • opensuse:

    zypper clean
    

Most, if not all, other package managers in other distributions have a similar functionality.

Another thing you can relatively easy do is delete old kernel versions. Most distributions keep the old kernels installed when installing a new kernel.

Here is a guide how to remove old kernels for debian and fedora: http://www.cyberciti.biz/faq/proper-way-to-remove-old-linux-kernels/

share|improve this answer
    
I am using Scientific Linux. Would you please note how to do it there? –  Zapadlo May 15 '13 at 15:27
1  
Scientific Linux is based on red hat which in turn is based on fedora. I have updated my answer with information for fedora and red hat. –  lesmana May 15 '13 at 17:02
add comment

If you want to reclaim disk space, the best way is to uninstall applications you don't need. List the biggest applications that are installed and check if you really need them. Since you didn't specify your operating system here's how to do it on Debian based systems:

aptitude search '~i' --sort installsize -F '%I %p'

Another approach is to delete user data that's not required. To find big files or directories, you can use a tool like baobab.

share|improve this answer
add comment

All or much in /var/tmp can probably be removed. Much in various /var/cache-directories - eg. previously downloaded apt-packages - can be removed. In the users home-directories, thumbnails generated by various file-browsers (eg. .thumbnails) can be removed. Also the caches of various web-browsers can be removed.

share|improve this answer
add comment

Beside getting rid of stuff you don't use, disk analyzing tools are also helpful because they help you find stuff you don't even think about. Maybe an application forgets to clean up its old logs, maybe old backups that you forgot about and don't need anymore.

The main difference is, instead of looking for stuff that you can delete, these tools show you the stuff that takes the most space, and then you decide whether that space is legitimate or wasted.

If you are on desktop I recommend baobab or KDirStat. For servers there is philesight.

share|improve this answer
add comment

In addition to what was already said you could also remove unneeded localization files, documentation, orphaned packages (if any). BleachBit is a nice complement to the GUI & CLI tools mentioned by the other posters.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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