Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mntalerOffline
Post subject: how to remove useless packages without apt-get autoremove  PostPosted: 26.05.2011, 21:07



Joined: 2011-01-26
Posts: 14

Status: Offline
Hi.

I started with sidux 2009-03 Preview 1 - kde-lite and used KDE for quite some time. Since the first installation I tested and removed various programs and WMs.
Some day i decided to use awesome + some xfce-programs and removed all KDE stuff.

Now I also want to remove also all useless libs and all other stuff that was not removed.

I read apt-get autoremove is a bad idea, so this seems to be no solution Sad
Is there any way to get rid of all the useless packages?

When calling apt-get-autoremove it shows me many libs, but also some programs - all together 224MB of disk space!
The disk space is not the big problem for me, but updating all these things is kind of stupid i think, escp. since my connection is not that fast.

Thanks for any usefull tips!
 
 View user's profile Send private message  
Reply with quote Back to top
gerdOffline
Post subject: RE: how to remove useless packages without apt-get autoremov  PostPosted: 26.05.2011, 21:39



Joined: 2010-09-13
Posts: 94

Status: Offline
I use autoremove (over synaptic gui), but as i think i am able to decide it the packages are useful or not i use it. when i remove a application and then there are libs to be autoremoved that i see to be dependencies of my removed app i remove them. If there is something suspious i keep it.

If you are a noob and you can't decide about packages importance you shouldn't remove anything.
 
 View user's profile Send private message  
Reply with quote Back to top
muchan
Post subject:   PostPosted: 26.05.2011, 22:32
Moderator


Joined: 2010-09-11
Posts: 468

      Quote:

When calling apt-get-autoremove it shows me many libs, but also some programs - all together 224MB of disk space!
The disk space is not the big problem for me, but updating all these things is kind of stupid i think, escp. since my connection is not that fast.

Thanks for any usefull tips!


My pragmatic strategy is, not try to remove massively, but watch the packages to be upgraded with d-u,
and check and remove unneccessary package before downloading.
i.e.
1) # apt-get update <-- I type apt-g<tab> upd<tab>
2) # apt-get dist-upgrade -d <-- I type apt-g<tab> di<tab> -d
3) read the package names to be downloaded.
If I see something I think I may not need say "n" for [Y/n] question then
4) apt-desc <package> <-- this is script, I'll post it later
(it's actually showing Description part of apt-cache show <package>)
5) If I suspect I can remove it, then simulate removing it
# apt-get -s remove <package>
and check if other package would be removed together. if I don't know what it is, repeat 4),5)
6) If I'm sure about removing, remove the package, or dependent programs altogether
# apt-get purge <packages>
7) when I'm happy with the packages to be downloaded/installed/upgraded, then I'll proceed
# apt-get dist-upgrade -d
8) and finally do real d-u. 1) to 7) can be inside X terminal.

It's so gradual reduction, but more important thing for me is to learn what package on my system
is serving what purpose.

now my apt-desc script. it's just one-liner...
      Code:

apt-cache show $1 | grep -A 50 '^Description:'

(copy it to /usr/local/bin, and chmod +x)
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: Re: how to remove useless packages without apt-get autoremov  PostPosted: 27.05.2011, 08:00
Team Member


Joined: 2010-09-02
Posts: 480

Status: Offline
      mntaler wrote:
I read apt-get autoremove is a bad idea, so this seems to be no solution Sad
Is there any way to get rid of all the useless packages?


There are many applications available to help you in this task. The keypoint is that you need to supervise them. There is no automatic "do-what-i-want" tool.

So then ever you read that 'autoremove is a bad idea' it's mean that it is a bad idea to run it and press enter without thinking about it. If you look at the output and validate that it's okay to remove that stuff everything is fine.

The release notes of aptosid recommend:
$ deborphan
$ apt-show-versions | awk '/No available version in archive/{print $1}'

The first is nearly a no-brainer, but having a closer look doesn't hurt (please see manpage for details!). The second will show you packages which are not available in an archive -- for example also packages you installed by hand with dpkg or removed the repository since then.

Searching for keywords can be interesting, too. Try
$ apt-cache search squeeze
some of them will be transitional packages you could remove if you want…

$ apt-get autoremove
Can be used, too. Helpful is
$ apt-mark markauto / apt-mark unmarkauto
in this regard to tweak the solution.

Tools like debfoster have similar ideas, but i have never used it…

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mntalerOffline
Post subject:   PostPosted: 27.05.2011, 16:41



Joined: 2011-01-26
Posts: 14

Status: Offline
Thanks a lot for the tips, I removed most of the libs shown by apt-get autoremove and deborphan.
some of the suggestions of autoremove were not found by deborpahn, but when inspecting them it could be seen that they all were depending on each other...

Thanks a lot for helping and thanks even more for showing me some new interesting tools Smile
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio