LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-13-2012, 01:08 PM   #1
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Safe things to delete from /


I have a system based upon Slackware64-current. I have been running this a while and periodically performed upgrades. It is on a multi-booted laptop with separate home and / partitions. The / partition has filled up to where it is reporting 100% utilization and I don't have a lot of room left on the drive to allocate more to it. BTW, it is an older PATA notebook drive and while I can get a 320 GB drive, I am not sure I want to invest ~$100 into this laptop, at least anytime soon.

I am looking for things that I can safely delete from the system and my question is for recommendations. It looks like a lot of space is being taken up in the package cache, under /var/cache and if I delete this I can recover almost 20% of the drive space, but I loose the ability to update the system or install or remove packages. Other options include removing the Linux Kernel Sources, and removing applications. Previously I tried uninstalling applications, but apparently removed a critical library and couldn't start KDE anymore. This has left me hesitant to go down this road, at least so aggressively anymore.

As it stands, I have had to re-image the drive with DD after killing the system a few times. At one point, I formatted this partition and reinstalled, with the new system taking up less than 40% of the space, which tells me that it is file creep-age. Unfortunately, the upgrade to -current bombed and I reverted the system back via the backup.

So, this leaves me wondering what things would be safe to remove to gain some space while not killing the system?
 
Old 06-13-2012, 01:12 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
You can remove your package cache with the package manager utility, with yum the command is yum clean all. Won't do any damage. You can also remove any old log files in /var/log that you do not need and if /tmp/ is on that same partition basically anything in there can be removed without worry.
 
Old 06-13-2012, 01:23 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Have a look at the /tmp file [edit: of course I meant 'directory' not 'file']. If you don't clean it regularly, there might be some unnecessary stuff there (delete it automatically on boot).

If you're using sbopkg, there'll probably be quite big /tmp/SBo and /var/cache/sbopkg directories. You can safely remove them.

Last edited by sycamorex; 06-13-2012 at 02:34 PM.
 
2 members found this post helpful.
Old 06-13-2012, 02:31 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Have a look at ~/.thumbnails I always remove this folder before doing a backup as it can hold a LOT of files.

Also have a look at what you can thwow a way from the ~/.mozilla folder ( the variaous cache files ) at the moment my .mozilla folder stands at over 120M - while I'm at it might as clean out my own one!

Last edited by Keith Hedger; 06-13-2012 at 02:36 PM.
 
1 members found this post helpful.
Old 06-13-2012, 03:40 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
/usr/doc and /usr/share/doc are pretty heavy.
 
2 members found this post helpful.
Old 06-13-2012, 03:44 PM   #6
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Slax had a script called prepare-crippled-kernel-sources.sh that would remove a lot of the kernel source but leave enough to allow building of extra kernel modules.
Code:
cd /usr/src/linux
# remove a lot of stuff
rm -Rf Documentation drivers fs net sound firmware
ls -1d arch/* | grep -v x86 | xargs rm -Rf
ls -1d include/* | grep asm- | grep -v x86 | grep -v generic | xargs rm -Rf
You will have to reinstall the kernel source package if you want to recompile your kernel though.

You can also remove some extra packages with:
Code:
slackpkg clean-system
 
1 members found this post helpful.
Old 06-14-2012, 03:19 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Exclamation

Quote:
Originally Posted by piratesmack View Post
...
You can also remove some extra packages with:
Code:
slackpkg clean-system
Be Careful! this will remove ALL third party packages ie anything that is not in the official install.
 
2 members found this post helpful.
Old 06-14-2012, 04:47 AM   #8
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Original Poster
Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
A warm thank you to everybody for their suggestions.

I cleared out the tmp directory. I thought, though it goes back well over a year, that I followed the suggestion by Genek in his Adventures in Slackware to add the command to clear out this folder. That reduced the usage down to 86%. The thumbnails folders did have some space on it. I cleared out the one under /root. For right now, I have decided to leave the /doc folders, but this is a good suggestion. I did remove a couple of packages that I manually installed and don't need and removed an older linux kernel that I had both a bz2 of and the directory. This one is my recovery boot, so I don't mess with it much but don't develop on it. I ran the crippled kernel clean up and that gained a few more percentage. All told, I reduced the utilization down to 70%, which I can likely improve upon by removing a few packages, e.g. calligra which was installed in a recent update.
 
Old 06-14-2012, 05:18 AM   #9
etienne
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: Slackware
Posts: 59

Rep: Reputation: 30
Quote:
Originally Posted by Keith Hedger View Post
Be Careful! this will remove ALL third party packages ie anything that is not in the official install.
Unless these packages are blacklisted...
 
1 members found this post helpful.
Old 06-14-2012, 11:44 AM   #10
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by etienne View Post
Unless these packages are blacklisted...
Yes I should have mentioned that, nice catch!
 
Old 06-14-2012, 05:01 PM   #11
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by Keith Hedger View Post
Be Careful! this will remove ALL third party packages ie anything that is not in the official install.
True, but it gives you a chance to deselect the ones you want to keep first.

Last edited by piratesmack; 06-14-2012 at 08:41 PM.
 
Old 06-14-2012, 10:36 PM   #12
hba
Member
 
Registered: May 2012
Location: Oaxaca, México
Distribution: Slackware Linux
Posts: 45

Rep: Reputation: 20
A suggestion, if you feel the size of your / is little at this moment, you can safely resize it with something like http://www.sysresccd.org, it's a live cd with the GParted program. Lets say you want to give some space from /home to /. It has some other programs/features so i would recommend it for those situations when you need to rescue a linux/windows system.
 
Old 06-14-2012, 10:37 PM   #13
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
There is a cleanup utility included with KDE that you can use. Sweeper(?) should be able to clean up and dispose of files you no longer need.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Log files - safe to delete? ButterflyMelissa Linux - Software 7 12-24-2011 11:41 AM
How do you know it's safe to delete old backups? newbiesforever General 6 07-18-2010 05:39 AM
Which files are safe to delete? zoomzilla Linux - Newbie 6 11-26-2009 06:39 AM
What is safe do delete in slack9? kleptophobiac Slackware 10 08-13-2003 09:30 PM
Is it safe to delete default nobody user? dunkyb Linux - General 2 03-16-2003 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration