[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Purging a package...............



On 25/11/14 13:02, Charlie wrote:
> On Mon, 24 Nov 2014 23:24:29 +0200 Andrei POPESCU sent:
> 
>> Because of this I set
>>
>>     APT::AutoRemove::SuggestsImportant "false";
>>
>> in apt.conf
> 
> I have no apt.conf but I do have an /etc/apt/apt.conf.d directory?
> 
> Am I missing an apt.conf file and should one be added?

Yes, and no ;)

You can create one, or, you can create a fragment file and place it in
/etc/apt/apt.conf.d
AFAIK, both approaches are "good".

An example fragment usage is to create a fragment e.g. (as root):-
nano /etc/apt/apt.conf.d/91autoremove
and populate it with Andrei's suggested config.

e.g.:-
cat /etc/apt/apt.conf.d/91autoremove
APT::AutoRemove::SuggestsImportant "false";



Notes:-
*Fragments are processed in alpha order (numbers, then the following
letters)- i.e. 10something will over-rule 11something, and 10something
will be over-ruled by 10thisthing.

*If two fragments have the same number they are processed in alpha order.

*Using the number 91 is an arbitrary choice.

*Fragments 'can' be easier to manage e.g.:- I keep a variety of
fragments in /etc/apt where they are ignored unless I, sometimes just
for momentary use, mv them to /etc/apt/apt.conf.d (where they are
processed by apt (using "apt-config").

*You may find you already have an autoremove fragment:-
cat /etc/apt/apt.conf.d/01autoremove
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image.*";
        "^kfreebsd-image.*";
        "^linux-restricted-modules.*";
        "^linux-ubuntu-modules-.*";
        "^gnumach$";
        "^gnumach-image.*";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "restricted/metapackages";
        "universe/metapackages";
        "multiverse/metapackages";
        "oldlibs";
        "restricted/oldlibs";
        "universe/oldlibs";
        "multiverse/oldlibs";
  };
};


Which you 'could' add the suggested config to, e.g.:-
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image.*";
        "^kfreebsd-image.*";
        "^linux-restricted-modules.*";
        "^linux-ubuntu-modules-.*";
        "^gnumach$";
        "^gnumach-image.*";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "restricted/metapackages";
        "universe/metapackages";
        "multiverse/metapackages";
        "oldlibs";
        "restricted/oldlibs";
        "universe/oldlibs";
        "multiverse/oldlibs";
  };

  SuggestsImportant
  {
        "false"
  };
};


For the apt.conf method (/etc/apt/apt.conf) see:-
/usr/share/doc/apt/examples/configure-index.gz
for examples

> 
> Charlie
> 

Kind regards

Useful refs:-
man apt.conf
http://debian-handbook.info/browse/wheezy/sect.apt-get.html#sect.apt-config
https://wiki.debian.org/AptConf


Reply to: