PDA

View Full Version : Locales removal issue



dedanna2959
5th March 2009, 03:06 AM
Hi, this is my first post here, mostly because I have no other problems with Fedora 10 (yet :) ).

But alas, Houston, I has me an issue, and I hope I'm posting it in the right place.

Since installing Fedora 10, my / partition has become larger than I like to have it. I've run down what's making it grow, as you can see, from the following:

[root@dedanna ~]# du -akx /| sort -nr | head -n 25
7249434 /
6398989 /usr
3936331 /usr/share
1797414 /usr/lib
531159 /usr/share/locale
480250 /usr/bin
394607 /usr/share/doc
374573 /usr/share/icons
277030 /var
269894 /usr/lib/openoffice.org
254992 /usr/lib/openoffice.org/basis3.0
222130 /lib
211559 /usr/lib/python2.5
192677 /usr/share/kde4
192046 /usr/share/texmf
191863 /usr/lib/python2.5/site-packages
183802 /usr/share/kde4/apps
182504 /lib/modules
156787 /usr/lib/openoffice.org/basis3.0/program
154829 /etc
152357 /usr/share/icons/oxygen
149996 /var/lib
148906 /usr/share/gnome
148842 /usr/share/gnome/help
137322 /usr/share/texmf/fonts
When I run the code on what appears to be the largest folder, this is what comes up:

[root@dedanna ~]# du -akx /usr/share/locale | sort -nr | head -n 25
531159 /usr/share/locale
17331 /usr/share/locale/fr
16595 /usr/share/locale/fr/LC_MESSAGES
15846 /usr/share/locale/de
15504 /usr/share/locale/ru
15217 /usr/share/locale/es
15142 /usr/share/locale/de/LC_MESSAGES
15080 /usr/share/locale/ru/LC_MESSAGES
14645 /usr/share/locale/es/LC_MESSAGES
14214 /usr/share/locale/sv
13805 /usr/share/locale/it
13454 /usr/share/locale/sv/LC_MESSAGES
13305 /usr/share/locale/it/LC_MESSAGES
13136 /usr/share/locale/ja
12826 /usr/share/locale/sr/LC_MESSAGES
12826 /usr/share/locale/sr
12588 /usr/share/locale/ja/LC_MESSAGES
12307 /usr/share/locale/pl
11740 /usr/share/locale/pt_BR
11635 /usr/share/locale/pl/LC_MESSAGES
11612 /usr/share/locale/pt_BR/LC_MESSAGES
11564 /usr/share/locale/nl
10856 /usr/share/locale/nl/LC_MESSAGES
10850 /usr/share/locale/el
10659 /usr/share/locale/cs
My issue is this: All I need, is the locale for en. When I try to remove the extranneous locales in Add/Remove Software, other needed packages want to go with them, such as DejaVu fonts, Devede, foobilliard, stellarium, and vlc, just to name a few.

How can I get these locales removed without bothering needed packages?

To show that this is high in / for me, here's the relevant parts for df (yes, I know I have some cleaning to do in /home):

[root@dedanna ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 8184768 6723236 1461532 83% /
/dev/sdb6 65872480 52103708 13768772 80% /home
tmpfs 516516 1464 515052 1% /dev/shm
I *normally* hover around the 70% mark for / (root). I have not had this install for long, just a few days.

Thanks to anyone who can help with this!

dedanna2959
5th March 2009, 08:54 PM
Some more information which would be useful, is on my Mandriva 2008.1 Powerpack installation, which I've had for what seems like ages now, I get very different results for /usr/share:

[dedanna@dedanna ~]$ du -akx /usr/share | sort -nr | head -n 25
2352804 /usr/share
260253 /usr/share/icons
236448 /usr/share/doc
215673 /usr/share/games
124117 /usr/share/scummvm
118376 /usr/share/texmf
118157 /usr/share/songbird
81955 /usr/share/apps
81403 /usr/share/texmf/fonts
79234 /usr/share/wallpapers
78832 /usr/share/fonts
76420 /usr/share/wallpapers/mdv-community/16x10
76420 /usr/share/wallpapers/mdv-community
74530 /usr/share/songbird/components
71221 /usr/share/scummvm/beneath-a-steel-sky
70769 /usr/share/scummvm/beneath-a-steel-sky/sky.dsk
67909 /usr/share/xemacs/xemacs-packages
67909 /usr/share/xemacs
67145 /usr/share/gcompris
66288 /usr/share/gcompris/boards
58941 /usr/share/games/supertux2
52896 /usr/share/scummvm/flight-of-the-amazon-queen/queen.1c
52896 /usr/share/scummvm/flight-of-the-amazon-queen
49997 /usr/share/games/pysol
48059 /usr/share/gimp/2.0
I've since come to find that on a live installation of Fedora, that the same thing happens as what did for me on my dvd installation. Are these locales really necessary?

Thanks!

Hlingler
5th March 2009, 09:00 PM
For info: [sudo] du -chx --max-depth=1 <directory> will give a human-readable output of all top-level folders in <directory>.

There is a filter macro for RPM: search these forums for my username and keywords: firefox remi. It's a long thread, but Remi Collet gives the answer, which has worked for me. BE AWARE that this breaks drpms (delta RPMs from Presto) since you are removing files from the installed RPM (only applies to RPMs installed/updated after macro).

V

dedanna2959
6th March 2009, 12:00 AM
Not sure I want to try that, but I did find a thread on firefox that applies. What I don't get, is when I attempt to remove the locales, it wants to remove everything but firefox. If the locales were installed for firefox, howcome it doesn't want to remove it when they're removed?

Thanks.

Hlingler
6th March 2009, 12:07 AM
Well: you can open firefox as root user (preferably off-line mode, for security reasons) and manually cull the languages add-ons (Tools=>Add-ons=>Languages), but that gets burdensome to do repeatedly. You can also simply begin deleting various folders in /usr/share/locale, but that is far more likely to break stuff than an RPM macro filter - which won't break anything, it will just force DRPMs to be skipped in favor of full packages during updates.

What do you mean: "when I attempt to remove the locales, it wants to remove everything but firefox" ? What exactly are you attempting to remove ?? Or do you mean: when firefox is open as a normal user, you can't remove them ??? That's because only root user can erase them system-wide add-ons - see above.

V

dedanna2959
6th March 2009, 01:48 AM
Well: you can open firefox as root user (preferably off-line mode, for security reasons) and manually cull the languages add-ons (Tools=>Add-ons=>Languages), but that gets burdensome to do repeatedly. You can also simply begin deleting various folders in /usr/share/locale, but that is far more likely to break stuff than an RPM macro filter - which won't break anything, it will just force DRPMs to be skipped in favor of full packages during updates.

What do you mean: "when I attempt to remove the locales, it wants to remove everything but firefox" ? What exactly are you attempting to remove ?? Or do you mean: when firefox is open as a normal user, you can't remove them ??? That's because only root user can erase them system-wide add-ons - see above.

V
When I try to uninstall them from Add/Remove Programs, is what I mean. It's almost as if the locales have nothing to do with Firefox, because it's not being taken out due to dependency issues. Just the packages I mentioned above are:

When I try to remove the extranneous locales in Add/Remove Software, other needed packages want to go with them, such as DejaVu fonts, Devede, foobilliard, stellarium, and vlc, just to name a few.
(By "remove" I mean uninstall.) Notice that Firefox isn't one of them.

Hlingler
6th March 2009, 01:53 AM
What exactly are the names of the packages that you are attempting to remove? All of them please.

V

dedanna2959
6th March 2009, 02:12 AM
burmese-support
ethiopic-support
georgian-support
gujarati-support
hebrew-support
hindi-support
inuktitut-support
khmer-support
korean-support
lao-support
maithili-support
malayalam-support
oriya-support
punjabi-support
sinhala-support
tajik-support
tamil-support
telugu-support
thai-support
urdu-support

still haven't decided about venda-support - I think it's a necessary one for several things? But the others - I don't even know what a lot of them are, much less need them.

Thanks.

dedanna2959
6th March 2009, 02:15 AM
I can see it wanting to remove the fonts for these locales, which makes sense, but it's only wanting to remove just a few fonts (DejaVu being one of them), and actual programs. Doesn't really make sense.

Hlingler
6th March 2009, 02:29 AM
I'm still unclear as to what you're looking at, and what you want to do.

Those appear not to be package names - those appear to be group names under the "Languages" Group (you using YUMEX ?). Each sub-group may contain one or more (I've even seen zero) font packages. Some of those packages may be required by other software that you have installed. A "blanket" removal may not be a good idea without a thorough look through the dependency chain.

As an example: I sifted manually through all installed font packages, and erased those that (A) I did not want, and (B) did not result in removal of stuff I do want. This process is reiterative: you may need to test it more than once.

HTH,
V

dedanna2959
6th March 2009, 02:45 AM
When I noticed that it was locales that was taking up the room in / , then I ran a search for "locales" in Add/Remove Programs. The search returned blank for "locales". What it did come up with was support for x languages.

So, how can I remove from the Languages group, support for x languages (which in the end is what "locales" is, anyway)? I don't need all these languages. I need one.

This (http://i251.photobucket.com/albums/gg285/dedanna1029/screenshots/screenshot-support-fedora-10.png) is only a few of the ones that came up in the list, and how they came up.

Thanks!

Hlingler
6th March 2009, 02:56 AM
OK, now I see - that's PackageKit's GUI, and it looks to be showing font support groups installed. In which case: removing fonts for unwanted languages may reduce your HDD space usage somewhat, but it won't do a darned thing about any of the stuff in folder /usr/share/locale/ - the files in there belong to possibly many RPM packages, all of which deposit their respective translation files to various appropriate common sub-folders of /usr/share/locale/.

Which brings me back to: the method to remove them - or at least to prevent them from being installed with new/updated packages - is to create that RPM macro. The macro will simply cause not to be installed the translation files (*.mo) to /usr/share/locale/*

V

dedanna2959
6th March 2009, 03:02 AM
Ok, will check it out I guess. sigh.

I'm wondering what group you were referring to earlier for "languages"?


[root@dedanna ~]# yum grouplist
Loaded plugins: refresh-packagekit
Setting up Group Process
Installed Groups:
Administration Tools
Authoring and Publishing
Base
Dial-up Networking Support
Editors
Educational Software
Engineering and Scientific
Fonts
GNOME Desktop Environment
Games and Entertainment
Graphical Internet
Graphics
Hardware Support
Input Methods
Java
KDE (K Desktop Environment)
LXDE
Legacy Fonts
Legacy Software Development
Mail Server
MySQL Database
Network Servers
Office/Productivity
Printing Support
Server Configuration Tools
Sound and Video
System Tools
Text-based Internet
Web Server
Window Managers
X Window System
Available Groups:
Clustering
DNS Name Server
Development Libraries
Development Tools
FTP Server
Fedora Eclipse
Fedora Packager
GNOME Software Development
Haskell Development
Java Development
KDE Software Development
Legacy Network Server
News Server
PostgreSQL Database
SUGAR Desktop Environment
Virtualization
Web Development
Windows File Server
X Software Development
XFCE
XFCE Software Development
Done
[root@dedanna ~]#

I'm not seeing it here?

Edit: I'm also not getting why removal of those packages would remove the ones it does? I don't see where stellarium, Devede, etc. would need those packages?

Thanks!

Hlingler
6th March 2009, 03:17 AM
My bad - I was thinking of the [Legacy-]Fonts groups.

As to the dependencies: the chain can be intricate, and is at the ultimate control of the Package Maintainer. If he decides that a font package is required for his RPM, well then it is. But I suspect that the chain leads back through more than one step here, like maybe stellarium requires freetype requires ... requires klingon-fonts-X11. :)

V

dedanna2959
6th March 2009, 03:37 AM
LOL.

Well, whatever it is, it makes no sense whatsoever. LOL.

I'm lost on RPM macro. I ran the search that was listed in that thread - "firefox language", and came up with a list of threads long as my arm, and the only thing I could find, the one I started with. LOL.

Got a link?

Thanks so much for your help, btw.

Hlingler
6th March 2009, 03:44 AM
http://forums.fedoraforum.org/showthread.php?t=192162&page=2

Scroll down to Post #30. Affects ALL RPMs installed/updated after creation. Here's my file /etc/rpm/macros.lang:
[Vince@localhost ~]$ cat /etc/rpm/macros.lang
# 2008-06-21 VJS: Add language filter for RPM installs as per Remi Collet's suggestion
# See: http://forums.fedoraforum.org/forum/showthread.php?t=192162&page=2
%_install_langs en
#End.
V

P.S. You must create and edit that file as root user or sudo.

P.P.S. You know, I focused so close on your specific question about locale files, that I overlooked other possible HDD space hogs. Typical things to do/look for include:
> install YUMEX and cull unwanted packages; reiterative, as some obscure stuff is often required for other desired packages. One of my first Fedora Administrative tasks after any new install.
> Make sure tmpwatch utility is installed, on, and working to keep /tmp/ folder to a manageable size, say <100 MB or so. tmpwatch is daily a CRON job, not a system service.
> Exteme, but you can investigate hardlink[++] to merge identical files, like in kernel package folders, with hardlinks. A lot of work, used to be worth it but now not IMHO.
> Others possible I'm sure.

dedanna2959
6th March 2009, 06:13 AM
Got the file created. I'm going to go thru after I get rid of these language packs and go from there on getting / down - see what else I can do without.

Thanks again!

dedanna2959
6th March 2009, 07:01 AM
Y'know, I got thinking. I started wondering what Mandriva is doing right (of course, this is subjective, from this user's point of view, right vs. not right) that Fedora isn't.

I checked the deplist for Firefox in each distro. Here are the results.

yum's deplist for firefox is here (http://www.pastebin.ca/1354148).

Mandriva's is here (http://www.pastebin.ca/1354149).

I don't have the / filling up issue in Mandriva.

I'll let you decide.

Hlingler
6th March 2009, 11:42 AM
Mm... no, you are more-or-less comparing apples and oranges: to get the equivalent output on Fedora as Mandrivel, run:
rpm -qR firefox

You will see virtually identical results. Notice that YUM gave very verbose output, listing also (A) what provides each requirement, (B) multiple listings where more than one package provides the same requirement, and (C) all packages, whether installed or available, providing said dependencies. So the output appears to be much more, when in fact the dependencies are the same (or nearly so). In particular: YUM shows AdobeReader as providing libstdc++.so.6* and libgcc_s.so.1*, when in fact (A) packages libstdc++ and libgcc can provide these with vastly smaller footprints, and (B) AdobeReader may or may not put the libraries where firefox can find them whenever it needs them. BTW, you don't actually have all available language versions of AdobeReader installed, right ? ;)

Also: when culling unwanted packages, consider removing any/all unnecessary *-devel and especially *-debug[info] packages. The debugging RPMs tend to be huge HDD space hogs. Some *-devel stuff may be required and/or desirable (like: kernel-devel), however, so use care when deciding whether or not to erase them (if in doubt: leave installed). YMMV.

It might be worth a second look at where HDD space is being used. Please post results of command:
sudo du -chx --max-depth=1 /

In the final analysis: it all depends on how much effort you are willing and able to devote to optimizing HDD space usage. On principle, I hate wasting space, so I put some moderate effort into it. But I also invested in the largest extra/secondary HDDs I could afford, so I don't really have to worry.

Good Luck,
V

sideways
6th March 2009, 03:11 PM
also try this in both distros:


rpm -qa --qf "%10{SIZE}\t%{NAME}-%{VERSION}\n" | sort -n

which will list installed rpm packages by size. locales come from glibc-common, which will be near the top in fedora, don't know if mandriva strips it first.

ahz
31st July 2009, 12:50 AM
You can also try BleachBit (http://bleachbit-project.appspot.com/) which is explained in the article "Free way more space than localepurge" (http://bleachbit.blogspot.com/2009/07/free-disk-space-localepurge.html). IMHO, BleachBit is easy to use: just be sure to run as root/sudo. The site has installation RPMs for Fedora/RedHat-like systems, and within days, you will probably find BleachBit in the Fedora/EPEL repos too.