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 > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-25-2012, 11:39 AM   #1
ld_k
LQ Newbie
 
Registered: Jun 2012
Distribution: Debian
Posts: 12

Rep: Reputation: Disabled
completely remove of useless files and configurations


Is it possible to remove completely useless files and configurations ?
For example,I had installed before two years Kde and there are still files that I don't need...

I usually remove the no-needed programs via Synaptic.
After I run

PHP Code:
apt-get autoremove 
I really need to freed some space.
 
Old 06-25-2012, 11:49 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by ld_k View Post
Is it possible to remove completely useless files and configurations ?
There is no way a linux app can decide for you what is useless and what isn't. If you need more space start doing some du's to track down what is consuming the space, then use your own judgement to decide if you still need that application or not.
 
Old 06-25-2012, 11:50 AM   #3
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
You should only delete what you're absolutely sure isn't used anymore.
I don't believe configuration files are eating out your disk space, as they're often a few KB in size...
You could make use of JDiskReport (you need a Java runtime environment to use it) to sort out which directories are the most cumbersome.

Last edited by 414N; 06-25-2012 at 11:54 AM.
 
1 members found this post helpful.
Old 06-25-2012, 12:29 PM   #4
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Here is an idea. cd to /usr/share/doc/ and then use 'gzip -d -v *' this will zip all the txt and html files. Dont worry vim and links can open a ziped txt and html files respectively. You can also go to /usr/local/share/doc/ if you have installed any applications from source. This is _a lot_ better than deleteing any configuration files. Check /usr/share/linux and see if you have the source code for kernel. As far I can see it is mostly the header files for the kernel that are important and not the actual kernel sources. Also look into /var/log and see if there are some old files (like xorgconfig) that can be deleted.
 
1 members found this post helpful.
Old 06-25-2012, 04:02 PM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Purge the package cache
Code:
# aptitude clean
Purge unneeded config files
Code:
# aptitude purge ~c
Install deborphan
Code:
# aptitude install deborphan
Have it check for orphaned packages
Code:
$ deborphan
If you're happy to remove the listed packages (i.e. you're certain you need none of them)
Code:
# aptitude purge `deborphan`
Or better still do this first
Code:
$ deborphan > ~/orphans.txt
That way if something breaks you can reinstall them.

Add local packages to a keep list to avoid deborphan removing them
Code:
$ deborphan -A package_foo
(where package_foo is the name of the package you want deborphan to stop reporting)

More info

Code:
$ man aptitude
Code:
$ man deborphan

Last edited by cynwulf; 06-25-2012 at 04:03 PM.
 
Old 06-25-2012, 04:10 PM   #6
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,884
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Debian Cleanup Tip #1: Get rid of useless configuration files - http://raphaelhertzog.com/2011/01/31...uration-files/

Mastering Debian and Ubuntu - http://raphaelhertzog.com/mastering-debian/
has several articles about cleaning up your system.

various ways to use deborphan
Code:
deborphan | xargs apt-get -y remove --purge
deborphan --guess-all | xargs apt-get -y remove --purge
deborphan --guess-dev | xargs apt-get -y remove --purge
debfoster is another useful apps for this purpose
Quote:
debfoster is a wrapper program for apt and dpkg. When first run, it
will ask you which of the installed packages you want to keep
installed.
.
After that, it maintains a list of packages that you want to have
installed on your system. It uses this list to detect packages that
have been installed only because other packages depended on them. If
one of these dependencies changes, debfoster will take notice, and
ask if you want to remove the old package.
.
This helps you to maintain a clean Debian install, without old
(mainly library) packages lying around that aren't used any more.

Last edited by craigevil; 06-25-2012 at 04:15 PM.
 
1 members found this post helpful.
Old 06-26-2012, 05:41 AM   #7
ld_k
LQ Newbie
 
Registered: Jun 2012
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
I freed about 7GB.

Thanks!!
 
  


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
Sourceforge has become completely useless Skaperen Linux - General 11 06-10-2011 02:20 PM
Is the CompTIA Linux+ completely useless? rkirk Linux - Certification 1 08-10-2009 09:11 AM
GTK+. Remove useless effect m4mach Linux - Software 2 11-29-2007 10:05 AM
Remove useless services / apps BeaverusIV Linux - General 6 08-22-2005 08:24 PM
How to remove KDE completely? leduytien Linux - Software 3 10-20-2004 11:45 AM

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

All times are GMT -5. The time now is 11:04 AM.

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