Debian This forum is for the discussion of Debian Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
06-19-2004, 06:31 PM
|
#1
|
Member
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian
Posts: 284
Rep:
|
Removing extra files using apt-get
Can Apt-Get scan my computer and remove excess files (like old copies of file that were upgraded with newer versions) and remove them?
If not what can I do to remove files no longer needed by my machine?
Mike
|
|
|
06-19-2004, 07:08 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
Old copies are usually removed when the new ones are installed. You can however have multiple versions of somethings at the same time ( things like gcc for example) so you can just remove the ones you don't want with apt-get remove --purge, this will warn you if anything is dependant on it.
The other thing that can happen is an orphaned package ( where nothing else depends on it ) To check for these you can use deborphan ( apt-get install deborphan ). Use it carefully.
To remove excess stuff that apt-get has use apt-get autoclean
Last edited by leonscape; 06-19-2004 at 07:09 PM.
|
|
|
06-19-2004, 07:19 PM
|
#3
|
Member
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian
Posts: 284
Original Poster
Rep:
|
When I remove a package, like lets say GAIM, will all the extra files (like dependencies) be removed with it?
Mike
|
|
|
06-19-2004, 07:26 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
What it depends on No, its other files Yes. Configuration files will be left behind unless you told apt-get to purge.
Thats why we have deborphan. Also most of a packages depedancies might be needed by something else. but to see what a package depends on ( so you can try to remove them ) use
apt-cache depends thepackage
From what I saw, what gaim depends on most of Gnome depends on as well.
|
|
|
06-19-2004, 07:36 PM
|
#5
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
aptitude is a front-end for apt-get that has options for cleaning obsolete files.
|
|
|
06-19-2004, 08:50 PM
|
#6
|
Member
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian
Posts: 284
Original Poster
Rep:
|
I love Aptitude!
|
|
|
06-20-2004, 10:39 AM
|
#7
|
Senior Member
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034
Rep:
|
I run a PII/266/128Mb RAM/10GB/Sid/GRUB So i try to keep it 'lean and fast'.
After a fresh install, the second thing i do, after installing a firewall is:
#apt-get install deborphan debfoster localepurge
DEBORPHAN
after installing 'deborphan', invoke it:
#deborphan
it will give you a list of "orphaned" libraries sometimes approaching 40 MB, to get rid of them:
#deborphan | xargs apt-get -y remove --purge
without the flag -y it will abort.
this will take care of the list of files listed when you first invoked 'deborphan'.
DEBFOSTER
This is a very good program to get rid of things you THOUGHT were gone when you did an
'apt-get -y remove --purge <name of package>
I purged emacs21 (i prefer Vim), debfoster came up asking me if i wanted to keep 'emacsen', hehe, i nuked it.
invoke it:
#debfoster
if you make a mistake, don't panic, just press the key 'U' to undo and correct your mistake, the question will pop again, check 'H' for help. If you don't know what a file/library does, DO NOT ERASE IT.
LOCALEPURGE
This will eliminate all the locales you don't need after installing a program. This will save you tons of real estate on your hdd. What i do is this:
#dpkg-reconfigure locales
i choose all the instances of en_US and es_ES, (spanish being my native tongue) set my language environment in the next screen, it will generate the locales and voilá.
Next, i invoke localepurge
#localepurge
it will take me to a list of locales identical to the one previously explained. Click OK, answer the next questions and you are set.
The next time you install a package it will just keep the locales you specified, you don't need Russian or Rumanian if you barely speak English, and viceversa.
One last note: after purging a program run
apt-get clean
this will nuke all files in the installation of that package. If you want it again, then reinstall it with apt-get.
I do the debfoster and deborphan bit once a week.
Last edited by macondo; 06-20-2004 at 10:49 AM.
|
|
|
06-20-2004, 05:24 PM
|
#8
|
Member
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian
Posts: 284
Original Poster
Rep:
|
Whoa, thanks a lot.
Mike
|
|
|
All times are GMT -5. The time now is 04:38 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.
|
Latest Threads
LQ News
|
|