Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Welcome to the forums! I'm afraid we can't tell from the data you've provided which files are "junk" and safe to delete. Generally speaking, the first place you should look is your /home folder, look for large files such as videos, music, etc. that you can back up to an external drive and then delete from your hard drive (/dev/sdb2).
A utility I find useful is 'baobab' (a GUI disk usage analyzer available in the repositories of most distros).
You get the idea. Find out where the big files are.
I would not delete any thing that's not in home.
You can also get rid of some software that you don't use.
What has taken that much space ?
1. Photos
2. Downloads
3. Games
4. I don't know
5. etc..
"I don't know" can be helped, the others you have to decide.
Logged in a your user, and at your home directory
>> du
which will give you a listing of all your directories and their usage.
>> du > du_log
will let you look at the du_log file more easily.
>> less du_log
Check your system logs. They can grow hideously large if you have some babbling problem devices, or you just reboot often.
If greater than a few MB, then switch to a new log file.
This is a protected file so there is a special command that I do not remember right now.
Location is /var/tmp/log if I remember right.
You might check /tmp, especially if you are in the habit of killing programs without letting them delete temporary files.
This is where temporary files reside.
After a few months, I usually have about 20 files in /tmp that can be deleted.
There will be some things in there that should be left alone, especially directories and printing stuff.
In /tmp, it is probably safe to delete anything older than your last boot, that your user owns, where you know what program left it behind.
I do not know of any program that would keep a reference to a /tmp file after a reboot.
Use tar or other archives to store photos and other large files that you do not access frequently. These can be stored in compressed format which can save 20% of your usage or more. The file managers can still open compressed formats and read files from within them.
Consider using subversion, GIT, or another repository for things where you have many nearly identical versions. These will store the original, and differences, which takes much less space.
Check where you could use soft links, instead of a copy of a file, or directory.
>> ln -s <remote file location> <name of local link>
Write some stuff to CDROM. This takes an large amount of free disk space to create the ISO image, so it must be done before your drive gets too full. It involves moving files to a cdrom-tmp directory, with the total less than 650 MB, then creating an ISO image of that cdrom-tmp directory, and then writing the ISO image to a CDROM. When the CDROM has been verified as readable, the cdrom-tmp directory can be deleted.
Use tar to create backups of your large directories (use --bzip2). Collect them to a directory and write them to CDROM. Files can be retrieved from the backup whenever needed, so you can clean many files from the directories that you have backed-up.
If you installed everything by default then there is some that could be removed, but it is tedious to find and decide.
A few MB could be found in /usr/doc because so many of the programs have documentation that is mostly just another copywrite copy. Maybe 20% of the programs have documentation there that you might want to access someday.
Internationalization is known to take excessive disk space. If you installed all the international files and use only one, then the others can be removed (like French, German , Swahili, Chinese, etc.). This is best done in your distribution configuration if it can. It can be tedious to track down for each program. You really need to know which one you are using, otherwise you will delete the wrong one. May be easier to reinstall individual programs without internationalization.
Start looking in /usr/share
Avoid compressing the whole drive (it is possible I have heard) because it takes special steps to mount and use, and you would still need a small uncompressed drive to boot.
After considering all this, consider focusing your question on one particular problem area that you found.
Last edited by selfprogrammed; 07-17-2013 at 02:40 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.