Remove 3D libraries from 5.1 (Linux)

I’m running 5.1 under Lubuntu.
I have absolutely no use for the 3D models and would like to remove them (~370 MB), as they fill up my backups and slow my updates unnecessarily.
There is no way to do this in the KiCAD program itself, I can only add 3D libraries in the PCB editor.

My question is: can I just delete /usr/share/kicad/modules/packages3d/ or is this a bad idea?
I could additionally edit ${KISYS3DMOD} to be /dev/null

You could delete that directory, it won’t stop aspects of Kicad working EXCEPT that the 3D viewer and exporter won’t have 3D parts anymore

Why not raise a bug report with Lubuntu and their package maintainers to offer split installs. Gentoo offers parts as separate installs for this reason

eix -c kicad
[N] app-doc/kicad-doc ((~)5.1.10): Electronic Schematic and PCB design tools manuals
[I] sci-electronics/kicad (9999[1]@30/09/21): Electronic Schematic and PCB design tools
[I] sci-electronics/kicad-footprints (9999[1]@26/09/21): Electronic Schematic and PCB design tools footprint libraries
[I] sci-electronics/kicad-i18n (9999[1]@26/09/21): Electronic Schematic and PCB design tools GUI translations
[I] sci-electronics/kicad-meta (9999[1]@26/09/21): Electronic Schematic and PCB design tools (meta package)
[I] sci-electronics/kicad-packages3d (9999[1]@26/09/21): Electronic Schematic and PCB design tools 3D package libraries
[I] sci-electronics/kicad-symbols (9999[1]@26/09/21): Electronic Schematic and PCB design tools symbol libraries
[I] sci-electronics/kicad-templates (9999[1]@26/09/21): Electronic Schematic and PCB design tools project templates

And even them won’t stop working, they just don’t show the models. :slight_smile:

KiCad has been designed to work with non-existing 3D models, there’s no need to change environment variables, footprints or designs.

@eelik: Cool, I’ll try that. Interesting will be whether the 3D models will be forced upon me again during a general system update.

@Naib: I think the Lubuntu team is the wrong address for this. After all, I’m installing/updating from a Launchpad PPA. I don’t see how Lubuntu could split this up into separate installs. Only the KiCAD team can do that.

Can you just not install the sci-electronics/kicad-packages3d package? Is it pulled in by the main package? What happens if you try to delete this package, does it allow you? (Incidentally I do not recommend removing files from under the package manager, it may detect inconsistencies later.)

On my distro, the 3D models package is optional. The split of a software suite across packages is up to the maintainer on the distro, not the KiCad project.

very true, edited the text to make it clear its not that they stop working, they will just be lacking the models

having a quick look at how ubuntu does it, its separate packages BUT the main kicad package pulls in kicad-packages3d. This is why Gentoo provides a kicad-meta that will pull everything in OR you can install the parts separately

@ retiredfeline:
I think you’ve misunderstood: I want to exclude the 3D models.

Yes, and if your distro packaging was constructed correctly you could simply not install them, and delete them if you already did. I would report this as a packaging problem. The 3D models package should be marked optional.

1 Like

Which brings us back full circle:
KiCAD does not have an option to remove/exclude the 3D models.
It has absolutely zero to do with Lubuntu, or its packaging. The packaging is done by KiCAD, not Lubuntu.
The question was: can I remove the 3D libraries? The answer was: yes you can. Fine. OK. Fixed.

Nope you are very wrong there. All Linux distros give the maintainer of the package the flexibility to split up the products of a build into packages in all kinds of configurations. For example for a software tool called acmetool, the acmetool-doc package is optional, and sometimes there is an acmetool-devel package which is used only by developers compiling against the software (typically a common library).

I used to do this packaging routine for a software tool I wrote decades ago, so I know what I’m talking about.

Yes. And Lubuntu is NOT the “maintainer”. How could they be?

Maintainer of the package, not the software. It’s useful but not necessary for the package maintainer to know how to develop the software.

What the package maintainer does is write a specification file. For example in the RPM format, this file is a .spec file. It gives the prerequisites for the build, the commands to do them, where the results will be stored (the locations of the binaries, libraries, documentation, etc.), their permissions, and the packages that will result from the build, as well as the dependencies between the packages (and others in the distro ecosystem).

Let’s look at the BIND package on my distro:

$ rpm -qa bind*
bind-9.16.6-22.10.1.x86_64
bind-chrootenv-9.16.6-22.10.1.x86_64
bind-utils-9.16.6-22.10.1.x86_64
$ rpm -q --requires bind | grep bind
bind-chrootenv
bind-utils
bind-utils
config(bind) = 9.16.6-22.10.1
libbind9.so.1600()(64bit)

So if you install bind, it will pull in bind-chrootenv and bind-utils, as well as libbind. There are lots of other dependencies I have filtered out with the grep.

On the other hand if you do the same for the bind-utils package:

$ rpm -q --requires bind-utils | grep bind          
config(bind-utils) = 9.16.6-22.10.1
libbind9.so.1600()(64bit)
python3-bind = 9.16.6

you see that bind is not a dependency of bind-utils.

So the Ubuntu package maintainer could have specified that kicad-3dmodels requires kicad but not the other way around.

How about just reading the instructions?

They state clearly what to do if you don’t want additional packages (libraries) installed with kicad.

Kicad is packaged correctly, main package recommends library packages but does not have hard dependency on them.

1 Like

The open software ecosystem is richer than your conception, OP. There are many people and skills involved in a project. Many of them don’t have programming skills yet are important. There are the developers, the documentation writers, the illustrators, the packagers, the website maintainers, the testers, the reviewers, the project managers, the bug triagers, and so on. For small projects that can be one person or a small team. But when a project spans many distros and platforms, then it very possible that a particular task is done by someone not associated with the main project, a volunteer perhaps. Maybe not for Ubuntu, which is a supported distro, but certainly the packages for my distro are done by a volunteer.

Open your nearest terminal emulator and then:

sudo apt remove kicad-packages3d

Yes, that’s probably the correct way to deal with it. If you delete the files without telling the package manager, next time an updated package is available, it will probably try to update the package and end up reinstalling the files, assuming it doesn’t complain about the old files having been deleted from under it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.