PDA

View Full Version : HOWTO: make aptitude remove unneeded depends of a metapackage


maybeway36
November 16th, 2007, 09:21 PM
- Bug report: https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/128681
- Workaround: edit the file.
Here is the default /etc/apt/apt.conf.d/01autoremove:
APT
{
NeverAutoRemove
{
"^linux-image.*";
"^linux-restricted-modules.*";
"^linux-ubuntu-modules-.*";
};

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


You need to change it to:
APT
{
NeverAutoRemove
{
"^linux-image.*";
"^linux-restricted-modules.*";
"^linux-ubuntu-modules-.*";
};
};

frodon
November 20th, 2007, 04:43 AM
Nice guide, thanks.

May i suggest to just comment the lines rather than deleting them as it would be easier in this case to revert back the changes for those you want to do it ?

maybeway36
December 1st, 2007, 02:15 PM
How do you comment lines in the APT directive files? Do you just begin them with #? I tried that and got:
E: Syntax error /etc/apt/apt.conf.d/01autoremove:11: Extra junk after value