How to remove unused locales In OM Lx 4

omlx-4
Tags: #<Tag:0x00007f4c3fab1070>

(Ben Bullard) #1

So you just installed OM Lx 4 and you’re wanting to run ‘OM-Welcome>Configure>Remove Unused Packages’ to remove mostly unused locales and a handful of unused hardware packages. (You could in Lx 3 also run this from cli as ‘remove-unused-packages’.)

Well you can’t because we don’t have it in Lx 4. So if you want to remove the unused locales this should do it for English only users:

# dnf remove locales-da locales-af locales-ko locales-zh locales-pl locales-id locales-uk locales-es locales-he locales-ja locales-ru locales-de locales-ar locales-it locales-hu locales-nl locales-pt locales-fr locales-tr locales-no locales-hi locales-ro locales-cs

for those of you better educated than me language wise just remove from that list all the other languages you wish to keep. (And be thankful that your country does a better job of educating people about languages than my country does.)

After running that you should still have:

# rpm -qa | grep locales
locales-2.28-7.x86_64
locales-en-2.28-7.x86_64

Plus any others you removed from the list to keep.

Post-edit: Users that don’t use British English may also want to:

# dnf remove myspell-en_GB libreoffice-l10n-en_GB firefox-en_GB

Post-edit: The above commands are already pretty thoroughly tested. I’ve done them 10 or more times so far with Cooker/Lx4 installs in VBox and on hardware.


#2

What happened to the OM Welcome => remove unused packages?


(Ben Bullard) #3

That is the ‘remove-unused-packages’ I’m talking about. So far it has not been rewritten for dnf for Lx 4 release. Don’t know if it will. I hope so though.

Maybe someone should file a ‘Package/feature request’ bug report.


(Ben Bullard) #4

Thanks @adelson.oliveira for pointing this out, I edited my initial post to include this.


(rugyada) #5

Besides them, you’ll find some leftovers which won’t be removed:
libreoffice-l10n-en_GB myspell-en_GB firefox-en_GB libreoffice-help-en_GB
In particular firefox-en_GB often is problematic for ff update.


(Ben Bullard) #6

Yes I do normally remove those as well. Edited 1st post to include. Main goal here is just to have quick copy and paste commands for users and especially testers to do this since our beloved ‘remove-unused-packages’ seems a goner.


(rugyada) #7

# dnf remove libreoffice-l10n-en_GB myspell-en_GB firefox-en_GB libreoffice-help-en_GB

(4 packages :wink: )


(Ben Bullard) #8

The fourth package does get removed auto-magically as a dependency with my command.

Post-edit: I’ve already used this command at least 10 times with Cooker and dnf. It goes way back to beginning of LX 3 and was used there with urpme.


(Abucodonosor) #9

calamares will take care of these and remove locales and such.


(rugyada) #10

(Ben Bullard) #11

That will be excellent. Thanks @abucodonosor.


(Abucodonosor) #12

@ben79

support is there as well for checking VirtualBox installation and based on that
remove guest package(s)…


(Ben Bullard) #13

:+1:


#14

Many error messages when issuing,

dnf remove locales-hi-2.28-7.x86_64 locales-de-2.28-7.x86_64 locales-he-2.28-7.x86_64 locales-ro-2.28-7.x86_64 lo
cales-fr-2.28-7.x86_64 locales-af-2.28-7.x86_64 locales-da-2.28-7.x86_64 locales-ja-2.28-7.x86_64 locales-hu-2.28-7.x86_64 locales-ru-2.28-7.x86_64 locales-uk-2.28-7.x86_64 locales-es-2.28-7.x86_64 locales-pl-2.28-7.x86_64 locales-ko-2.28-7.x86_64 locales-zh-2.28-7.x86_64 locales-cs-2.28-7.x86_64 locales-nl-2.28-7.x86_64 locales-tr-2.28-7.x86_64 locales-it-2.28-7.x86_64 locales-ar-2.28-7.x86_64 locales-no-2.28-7.x86_64 locales-id-2.28-7.x86_64

Examples are:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 272, in callback
    self._uninst_progress(amount, total, key)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 356, in _uninst_progress
    transaction_list = self._extract_cbkey(key)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 244, in _extract_cbkey
    raise RuntimeError("TransactionItem not found for key: %s" % cbkey)
RuntimeError: TransactionItem not found for key: myspell-de_CH

Many attempts to remove non-existent man-page files like,
file /var/cache/man/es: remove failed

and, finally, another bunch of error messages:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 240, in do_transaction
    tid = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 872, in do_transaction
    tid = self._run_transaction(cb=cb)
  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 1021, in _run_transaction
    self._verify_transaction(cb.verify_tsi_package)
  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 1059, in _verify_transaction
    self.history.end(rpmdbv, 0)
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 504, in end
    bool(return_code)
  File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 758, in endTransaction
    return _transaction.Swdb_endTransaction(self, dtEnd, rpmdbVersionEnd, state)
RuntimeError: TransactionItem state is not set: myspell-de_AT-1.0.2-43:3001.noarch

(Ben Bullard) #15

You already know that python3.7 is broken form another forum thread. That will affect everything that depends on python3.7.

There are going to be a lot of those errors until python packages get fixed.


(Ben Bullard) #16

These python3.7 errors should be fixed now.


(Ben Bullard) #17

This procedure is redundant. This is now automatically done by the Calamares installer.

Closed topic.


(Ben Bullard) closed #18