Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Things to help keep your OS's lean, mean n clean.

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Things to help keep your OS's lean, mean n clean.

#1 Post by Deb-fan »

You know what they say ... cleanliness is next to geekiness. :D

Just happened across an interesting tidbit about removing chuff on a gnu/Linux OS and wanted to share. Okay ... sometimes when poking around with packages, you'll see one listed as rc (this stands for residual configs) in dpkg-etc output, meaning it's no longer installed but some configuration files were left behind. Often I do use "apt purge" to get rid of as much of this chuff as possible but when someone uses "apt remove packagename", the pkg is uninstalled the chuff remains. So for example, when messing around with the vrms ( virtual Richard M Stallman, a big-wig associated with Gnu and copyleft etc.) When you install this pkg and run it with ie: "sudo vrms" it'll list out what/which closed source pkgs are installed on your OS from nonfree and contrib sources. Well noticed one I'd removed a long time ago kept popping up with it's install status as this "rc" thing. Keep thinking dang, Richard Stallman is strict about this stuff. The program keeps reminding me I had at one time installed a proprietary pkg but give me a break ... I removed it. :P

So started digging into it a bit more and came up with the following to identify and remove the config chuff left behind in situations like this. Finding them ...

Code: Select all

dpkg -l |grep ^rc

or

Code: Select all

dpkg -l |grep "^rc"
or this using apt,

Code: Select all

apt list | grep 'residual-config'


Getting rid of them, one method with aptitude and one with dpkg. ( I used this and it got rid of 37 packages and assoc chuff I'd left hanging around)...

Aptitude: I opted for this one, if aptitude isn't installed on your OS's obviously do so.

Code: Select all

sudo aptitude purge ~c
Dpkg: (You see why I used aptitude.) This one didn't bother testing, already had aptitude installed.

Code: Select all

sudo dpkg -l |grep "^rc" | awk '{print $2}' | sudo xargs dpkg -P
This removed the chuff from 37 pkgs and this clarified why vrms output was still hounding me mercilessly about proprietary/contrib pkgs I'd already long removed. Also think it's worth installing the vrms pkg and reviewing this info for nonfree-etc pkgs you don't need. I have an intel processor and also had amd-microcode installed so removed it, one less closed source pkg, RMS was pleased, though still very disappointed in me. Still have 7 nonfree and 3 contrib out of 1529 pkgs. Think I'm doing fairly well, no matter how the much revered RMS feels about things. :D

Note: Of course also think it's a general good practice to do some spring, autumn cleaning in my users /home directory too. Removing config files/directories left behind by long removed progs. Stuff apt/itude etc won't touch by design.

Other stuff along these lines, installing/using a package-app named Bleachbit (avail in repo's) I've never had any issues with this prog, some report problems but I don't just ignorantly run the thing as root, check every box without bothering to read what they do either. Aka: Some folks are not brainiac's and tend to inflict problems on themselves whatever they're doing. Some good stuff bleachbit can do, it can remove unused locales, if you speak english you don't need french, chinese etc etc man pages and doc's on your system, run bleachbit as root/sudo, check a box under System named "Localizations", ensure you've checked the boxes to retain the proper languages you do speak-use, it'll even prompt you about this, then run it to remove all these unnecessary files from your OS, it can recover quite a bit of drive space.

There's also a big button to click if you ever want to "Preview", shows how much/what will be removed too, before deciding whether to proceed. Another thing it can do, when run just as user (launched by typing bleachbit in run dialogue etc) there's a section related to Chrome/ium, Firefox etc. In such installed browsers you'll see one for Dom Storage, cleaning this gets rid of Html5 cookies ... super cookie kind of things. Another good one is it'll allow someone to vacuum these different browsers sqlite databases, which should make them smaller and run better. Though don't suggest doing that very often, certainly doesn't and shouldn't be run every time the browser is launched, shouldn't need to be done between long spans of time. I do so once in a bluemoon just cause. Long used, long liked Bleachbit, it's worth knowing about. If someone checks every box as root/sudo and user, doesn't bother reading prompts describing what they're for-do and causes themselves issues, good they're stupid, maybe some pain and suffering will teach them. Though tend to doubt it. :D
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply