Installing single non-free packages

New to Debian (Or Linux in general)? Ask your questions here!

Installing single non-free packages

Postby RichardEU » 2017-08-31 10:15

Hi,

I would like to use Debian without non-free. My Lenovo T550 has an intel WiFi card which requires non-free and I think I am correct to say that there isn't a suitable Atheros chip card to replace it.

I know how to edit sources.list to add non-free. I have also learnt about adding packages from backports.

I would like to know if it is possible to install select, single packages (such as the intel wifi one) without having to enable non-free repositories for everything.

I have searched the internet for solutions but everything I find goes straight to the option of adding contrib and non-free to sources.list. Ideally I would like to keep my computer as free as possible. I have tried Trisquel and Libreboot but feel a free Debian setup with as minimal non-free as possible is a good compromise for me.

Thank you for any help
RichardEU
 
Posts: 5
Joined: 2017-08-31 09:56

Re: Installing single non-free packages

Postby wizard10000 » 2017-08-31 10:28

RichardEU wrote:...I would like to know if it is possible to install select, single packages (such as the intel wifi one) without having to enable non-free repositories for everything.


Hi, Richard -

firmware-iwlwifi has no dependencies so it can be installed standalone but you won't get any upgrades to the package without installing them manually.

You can grab the oackage here - https://packages.debian.org/stretch/firmware-iwlwifi and install it manually - as root:

Code: Select all
dpkg -i /path/to/firmware-iwlwifi*.deb

but it would probably be a little more wise to go ahead and enable non-free and install that package only; that way you can get updates.

Hope this helps -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1182
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Installing single non-free packages

Postby Lysander » 2017-08-31 10:30

Why not just enable the non-free repo, download the software, then disable it?

I have done the same with Opera browser. Only because the consistent updates annoyed me, however.
User avatar
Lysander
 
Posts: 313
Joined: 2017-02-23 10:07
Location: London

Re: Installing single non-free packages

Postby RichardEU » 2017-08-31 11:32

Does adding non-free to sources.list and update&&upgrade not apply a global change? I.e., it'll upgrade lots of packages to non-free versions? Sorry, I'm a bit confused.

Also, If I install a non-free package, then remove non-free from sources, how does that package still get updated?
RichardEU
 
Posts: 5
Joined: 2017-08-31 09:56

Re: Installing single non-free packages

Postby deborah-and-ian » 2017-08-31 11:41

RichardEU wrote:Does adding non-free to sources.list and update&&upgrade not apply a global change? I.e., it'll upgrade lots of packages to non-free versions? Sorry, I'm a bit confused.

Also, If I install a non-free package, then remove non-free from sources, how does that package still get updated?

If you have no other non-free packages, why would it upgrade lots of packages? If I understood correctly, you'll only install 1 package.
Debian GNU/Linux 9 Stretch w/Gnome 3.22

Acer Aspire E5-521G
AMD A8-6410 APU
4 GB RAM
integrated AMD Mullins
dedicated AMD Hainan Radeon R5 M240 2 GB
240 GB Toshiba Q300 SSD
Realtek RTL8111/8168/8411 ethernet
Qualcomm Atheros QCA9565 wireless
deborah-and-ian
 
Posts: 171
Joined: 2016-07-13 08:40

Re: Installing single non-free packages

Postby bryanmc » 2017-08-31 11:56

deborah-and-ian wrote:If you have no other non-free packages, why would it upgrade lots of packages? If I understood correctly, you'll only install 1 package.


Exactly.
bryanmc
 
Posts: 56
Joined: 2016-11-18 12:21

Re: Installing single non-free packages

Postby Lysander » 2017-08-31 12:07

RichardEU wrote:Does adding non-free to sources.list and update&&upgrade not apply a global change? I.e., it'll upgrade lots of packages to non-free versions? Sorry, I'm a bit confused.


You're mixing up how main and non-free work. They are separate packages and non-free are opt-in.

RichardEU wrote:Also, If I install a non-free package, then remove non-free from sources, how does that package still get updated?


It wouldn't. If you want to keep your sources.list 'clean' and have control of your updates, you could remove it. It depends what's important to the user. As I said earlier, as an example, I have commented out my Opera repo. I won't get any more Opera updates, but that's my choice - in fact it's the exact reason why I commented it out.
Last edited by Lysander on 2017-08-31 13:14, edited 1 time in total.
User avatar
Lysander
 
Posts: 313
Joined: 2017-02-23 10:07
Location: London

Re: Installing single non-free packages

Postby RichardEU » 2017-08-31 13:01

So if I intall Debian, then add 'contrib non-free' to sources.list, apt update && upgrade, then it will literally only install that one wifi package? It wont installing any other package?

Or should I add contrib non-free and then simply apt-get install firmware-iwlwifi and then remove contrib non-free from sources.list?

If it's the latter what practical difference is there between doing the above or doing ghe method wizard1000 mentioned? In both cases there will be no updates if I understand correctly. If so, surely it's quicker to do what wizard1000 said than to edit sources.list.
RichardEU
 
Posts: 5
Joined: 2017-08-31 09:56

Re: Installing single non-free packages

Postby Lysander » 2017-08-31 13:09

RichardEU wrote:So if I intall Debian, then add 'contrib non-free' to sources.list, apt update && upgrade, then it will literally only install that one wifi package? It wont installing any other package?


It won't install anything if you don't tell it what to install.

RichardEU wrote:Or should I add contrib non-free and then simply apt-get install firmware-iwlwifi and then remove contrib non-free from sources.list?


Only if you don't want updates. If you do, leave it.

RichardEU wrote:If it's the latter what practical difference is there between doing the above or doing ghe method wizard1000 mentioned? In both cases there will be no updates if I understand correctly. If so, surely it's quicker to do what wizard1000 said than to edit sources.list.


I would suggest editing sources.list. You can then choose to disable the repo if you don't want updates and keep it enabled if you do.

Sources.list is a vital file to get to grips with if you want to control how Debian handles updates. Read this because it's pertinent to learn the basics of the OS you're using.
User avatar
Lysander
 
Posts: 313
Joined: 2017-02-23 10:07
Location: London

Re: Installing single non-free packages

Postby RichardEU » 2017-08-31 13:34

Thank you for taking the time to answer my questions. I will defintiely have a read of the link you provided.


So, just to check I have it right, I could theoretically add 'contrib non-free' to sources.list and maintain a fully free OS by only selecting free packages from synaptic for example. I am simply expanding the pool of potential packages I could install?

I think I am getting confused by assuming that enablng non-free repos will automatically alter the installation - eg switch free drivers to non-free ones and so forth.
RichardEU
 
Posts: 5
Joined: 2017-08-31 09:56

Re: Installing single non-free packages

Postby wizard10000 » 2017-08-31 13:39

RichardEU wrote:Or should I add contrib non-free and then simply apt-get install firmware-iwlwifi and then remove contrib non-free from sources.list?


This. Commenting out or removing non-free will prevent firmware-iwlwifi from receiving updates. As Lysander said contrib and non-free are opt-in, so as long as the only non-free package you install is firmware-iwlwifi that's the only package that will be installed. No contrib or non-free packages are installed automatically, ever.

If you only install one non-free package then that's the only package you'll have that's non-free. But - if you leave the repositories enabled that package will receive updates with the rest of your system.

Hope this helps -

edit: No, Debian will not automatically replace open source drivers with non-free ones. All non-free packages need to be explicitly installed. For instance, I have an Nvidia video card and use open source drivers; I have contrib and non-free enabled but I would have to specifically install a closed-source driver from non-free if I wanted it. All we're doing is enabling the non-free repositories and installing a single package from it.
Last edited by wizard10000 on 2017-08-31 13:43, edited 1 time in total.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1182
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Installing single non-free packages

Postby bryanmc » 2017-08-31 13:41

RichardEU wrote:I think I am getting confused by assuming that enablng non-free repos will automatically alter the installation - eg switch free drivers to non-free ones and so forth.


In basic terms, apt-get will only install packages that you direct it to with apt-get install, and will only upgrade files that are installed with apt-get update and apt-get upgrade, regardless the repos that are enabled.
bryanmc
 
Posts: 56
Joined: 2016-11-18 12:21

Re: Installing single non-free packages

Postby wizard10000 » 2017-08-31 13:44

bryanmc wrote:In basic terms. apt-get will only install packages that you direct it to with apt-get install, and will only upgrade files that are installed. regardless the repos that are enabled.


Correct.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1182
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Installing single non-free packages

Postby RichardEU » 2017-08-31 13:46

wizard10000 wrote:Hope this helps -


Definitely. Thanks for the help.
RichardEU
 
Posts: 5
Joined: 2017-08-31 09:56


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable