Remove unneeded locales to free disk space

Hello,

I noticed that the root partition is at 88% usage, and checked where I could possibly delete some unneeded stuff.
Best candidate is “/usr/lib/locale” where many language files are that I probably won’t need.

Is it safe to delete everything except “en_US.UTF-8” (used locale)?
How do I prevent regeneration of those files?

Lars

Sorry I can not answer about the local language files at /usr/lib/locale

I am curious about how much space you have available. Can you do a

df -h

and post the results?

It’s the old layout. I’d stay with it until absolutely necessary to change to the new partition scheme.

ipfire:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        917M  4.0K  917M   1% /dev
tmpfs           928M     0  928M   0% /dev/shm
tmpfs           928M  668K  928M   1% /run
/dev/sda3       2.0G  1.6G  234M  88% /
/dev/sda1        59M   32M   24M  58% /boot
/dev/sda4        27G  360M   26G   2% /var
/var/lock       8.0M   12K  8.0M   1% /var/lock
none            928M   45M  884M   5% /var/log/rrd
none            928M  308K  928M   1% /var/log/vnstat

I think you there at “necessary”.

I went through the same thing:

It wasn’t as bad as I thought it would be. Make sure you run a IPFire Backup AND copy it to another device!

Yes, I saw that thread =)

I would support redoing the installation to get the updated partitioning structure. It removes all the worries you have about disk space and you don’t have to worry about deleting files that may or may not be needed. Also they likely will be restored on an update.

I do re-installations fairly often on a VirtualBox VM testbed I have, for doing testing work on bug changes etc, so I do get a bit of practise and it takes me about 15 minutes to do a re-install. Without the practise I still think it would only take about 30 minutes as long as you are prepared.

That preparation involves making a list of the mac addresses for each interface and what ip address you use for green, blue and orange.
Also as @jon noted take a backup and download it to the pc that you have the WUI on so it is not on the IPFire machine that you will re-install.

The above does presume that you don’t have any special tunings where files are edited that normally aren’t changed as those likely won’t be backed-up unless you have added those files to the
/var/ipfire/backup/include.user file.

You could always create a VM machine using VirtualBox on another pc to test out doing the re-installs so you get to feel comfortable doing it.
https://wiki.ipfire.org/installation/virtual-box

1 Like

Thanks, I will save that information for later when the proper fix is unavoidable anymore. I would have to do this on a weekend to not interrupt our users (and I wouldn’t take chances doing this in midweek).

Regarding updates: The deletion would be incorporated in the update workflow and be done manually. I could also simply use a cron job to check/delete.

Though, does anyone have infos if these files can safely be deleted?

Hello,

Some weeks ago I had the same problem. I fixed it using a Live CD with GParted without reinstalling IPFire.

That was that I did:

[ I have edited the steps because, sorry]

  1. Reduce the size of the sda4 partition.
  2. Make a copy of the swap partition.
  3. Delete the original swap partition.
  4. Increase the size of the sda1 and sda3 partitions.

After a reboot all worked like a charm.

I did it first in a virtual machine and later in a production machine without problems in both cases. I don’t know if you have the same partitions schema but I guess yes. Don’t try it without to make a backup first. Best if you can try with a virtual machine.

This is a df -h output before the change:


Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        982M  4.0K  982M   1% /dev
tmpfs           993M   12K  992M   1% /dev/shm
tmpfs           993M  540K  992M   1% /run
/dev/sda3       2.0G  1.6G  221M  88% /
/dev/sda1       250M   32M  201M  14% /boot
/dev/sda4       456G   19G  415G   5% /var
/var/lock       8.0M   12K  8.0M   1% /var/lock

And this after the change:

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        977M  4.0K  977M   1% /dev
tmpfs           989M   12K  989M   1% /dev/shm
tmpfs           989M  500K  989M   1% /run
/dev/sda2        20G  1.6G   17G   9% /
/dev/sda1       504M   35M  434M   8% /boot
/dev/sda4       437G   28G  387G   7% /var
/var/lock       8.0M   12K  8.0M   1% /var/lock

I hope that help you.

Regards.