You are not logged in.
Pages: 1
Hey all,
My question is this; I've been installing a few different packages lately, often to try to get what's needed to get a particular program to run. After realizing that I don't need to run that program any more, I'd like to clean the clutter of those packages.
Is there any set of commands, or a repeatalbe method, that would show me what packages aren't being used, or have never been used? So that I could find out which ones to nix?
(In this case, the program was Aleph One, the open source game engine to run the old Marathon first person shooter games from years ago. I stopped trying to get it working when I realized that the whole point of my #! laptop was for work, not play!)
Last edited by typewriterjason (2012-10-11 21:34:09)
Fortune favors the bold.
#! WALDORF
Asus EEEPC 1001PXD | Lenovo ThinkPad t410
Offline
I assume, in this case, `sudo apt-get autoremove --purge` isn't getting rid of everything? I've noticed this happens sometimes.
I know APT keeps a record of what's installed, and possibly when. I can't check for it right now, as I'm at work at a Windows pooter, but I think it's in /var/cache/apt?
Offline
Is there any set of commands, or a repeatalbe method, that would show me what packages aren't being used, or have never been used? So that I could find out which ones to nix?
There are many ways it could fail (due to unforseen accesses or fs settings), and I could be stupid and/or misguided, but here's a thought to get juices flowing:
progs that have been used this month:
find /usr/bin -atime -31
ie, access time less than 31 days.
progs that have not been used in a year:
find /usr/bin -atime +365
ie, access time greater than 365 days.
brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)
Offline
These are some neat ideas...
Hey, Pvsage... I haven't actually tried that apt-get option, colour me a noob!
Is there a way to see a list of what's would be removed first? Maybe I should just read the manual...
Fortune favors the bold.
#! WALDORF
Asus EEEPC 1001PXD | Lenovo ThinkPad t410
Offline
It will tell you what it's removing and ask for confirmation. You can also look in /var/cache/apt/archives for a record of installed packages.
Offline
Maybe I should just read the manual...
Chop wood; carry water. (Edit: Sounds like somebody's found enlightenment.
)
Last edited by pvsage (2012-10-12 20:49:44)
Offline
progs that have been used this month:
find /usr/bin -atime -31
ie, access time less than 31 days.
progs that have not been used in a year:
find /usr/bin -atime +365
ie, access time greater than 365 days.
That's really neat
By the way, apt-get autoremove wants to get rid of networkmanager...Sounds like a bad idea to me...Is there a way to prevent autoremove to discard a specific package?
I love #! more than my own kids. I told them and they sympathized.
Offline
^ autoremove will only remove the remnants or dependencies of applications that have already been removed. If network manager is there, it would seem that it has been removed.
Post the output of what you have seen and run and post the results of:
apt-cache policy network-manager
Offline
^ Thanks for the reply VastOne.
apt-get autoremove
The following packages will be REMOVED:
crda diffstat dnsmasq-base iw libavdevice53 libavfilter2 libglee0d1
libjim0debian2 libmozjs15d libnetfilter-conntrack3 libnl-genl-3-200
libnm-gtk-common libnm-gtk0 liboil0.3 libopenobex1 libunicap2 libweed0
libx264-125 lives-data mobile-broadband-provider-info modemmanager
network-manager ogmtools quilt usb-modeswitch usb-modeswitch-data
wireless-regdb wpasupplicant xulrunner-10.0 xulrunner-15.0
0 upgraded, 0 newly installed, 30 to remove and 0 not upgraded.
apt-cache policy network-manager
network-manager:
Installed: 0.9.4.0-6
Candidate: 0.9.4.0-6
Version table:
*** 0.9.4.0-6 0
500 http://ftp.jp.debian.org/debian/ wheezy/main amd64 Packages
500 http://http.us.debian.org/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status
I love #! more than my own kids. I told them and they sympathized.
Offline
^ If you are, indeed, using network-manager to connect and not ifup/down, wpasupplicant or whatever, then something like
sudo apt-get install network-manager --reinstall && sudo apt-get autoremove
should set network-manager to manually installed and prevent it from being discarded.
Offline
Thanks pvsage! I am using network manager. I don't know about ifupdown, maybe I should have a look at it
The story is I thought I'd remove the wifi packages using the smxi script (an option when running the script) since I have a wired connection. I know it's a bit looking for troubles...I will follow your instructions!
Thanks guys.
I love #! more than my own kids. I told them and they sympathized.
Offline
sudo apt-get install deborphan
sudo orphaner
a simple 'deborphan' shows orphaned packages, and the orphaner is a curses app that can simulate removal. Nice thing, but be careful.
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
@machinebacon hate deborphan's ncurses ui, or even the ugly gtk one, I use apt:
First I list the orphaned packages with
deborphan --guess-data
and then to remove those poor orphans I use:
apt-get purge $(deborphan --guess-data)
Offline
The only thing that is missing in deborphan (opposed to orphaner) is the simulation, but you can add -s to the apt-get command -- which doesn't help detecting the orphans after a proposed orphan removal.
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
An alternative to re-installing packages if you just want to remove the "automatic" mark is apt-mark:
apt-mark unmarkauto packagename
Should be quicker anyway.
John
--------------------
( a boring Japan blog , Japan Links, idle twitterings and GitStuff )
#! forum moderator BunsenLabs
Offline
This thread seems to relate to the ongoing efficiency and savings theme to the forum.
I was wondering whether I should remove unecessary localisations using bleachbit. Thoughts? I would keep english uk, english us, spanish, and french.
Would it also be recommended to use an orphan package removing tool? I am pretty unknowledgeable about which libraries I would and wouldn't need. But I guess there is a lot that could be cut out.
Colonic anyone?
Offline
dura,
you have my blessing with regards to bleachbit and orphaner. In bleachbit be careful if you run it as root. By all means, do not choose to 'wipe free space' or 'Memory' in the list; they can take ages and seriously bork your system when you run it as root.
deborphan/orphaner are quite safe. You will need to run it again and again until all orphans are removed. Usually nothing serious would happen., because it only removes unused libraries and packages, but of course if you are in doubt, better remove them manually (use deborphan and apt-get autoremove --purge the packages, one after the other, always alternating deborphan and apt-get)
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
^Thanks a lot machinebacon. So I'm going to go ahead with deleting all the unneeded localisations. Yay! I may also venture into orphan space later. Oh its so sad. Thanks grillmeister
Offline
You'll free up some hundreds of MBs ]:D
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
^ 287mb gone! Thanks grillmeister
Now to audit them orphans
Offline
Ta-dam! Ask if you are in doubt
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
apparently, deborphan told me I only had linux-image-2.6-amd64 to remove, so I sold it to the circus ]:D
Cheers machinebacon (and thanks for introducing me to the world of tilers...)
Offline
Welcome to the tiling world, though I don't really use them -- you know, we can't decide
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat