Created
November 3, 2020 10:44
-
-
Save waja/4cdf7e281cf90d7bf175ced177f2a89b to your computer and use it in GitHub Desktop.
fix recommends
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f /etc/apt/apt.conf.d/00InstallRecommends ]; then | |
# remove any existing value from file | |
sed -i '/^APT::Install-Recommends/d' /etc/apt/apt.conf.d/00InstallRecommends; | |
sed -i '/^Aptitude::Recommends-Important/d' /etc/apt/apt.conf.d/00InstallRecommends; | |
# set the value | |
echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo 'Aptitude::Recommends-Important "False";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo "* Disabled automatical installation of recommended packages" | |
else | |
# set the value (and create a new file) | |
echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo 'Aptitude::Recommends-Important "False";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo "* Disabled automatical installation of recommended packages" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment