[GTALUG] Ubuntu (or debian): apt-get auto-remove?

Bob Jonkman bjonkman at sobac.com
Sun Aug 16 23:45:09 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been using this script to update, dist-upgrade, autoremove, and
autoclean all in one command.  Hasn't burned me yet, running it on
Debian 8, LMDE, Ubuntu 12.04, Ubuntu 14.04, and Ubuntu 14.10.

- --Bob, who one of these days needs to settle on a single distro

===== update script =====
#! /bin/bash

# Program: update
# Purpose: Perform 4-step apt-get update, dist-upgrade, autoremove and
autoclean
# Author: Bob Jonkman
# Date: 22 March 2012

echo "Update:"
apt-get update
if [ $? != 0 ] ; then
 exit
fi

echo "Upgrade:"
apt-get -y dist-upgrade
if [ $? != 0 ] ; then
 exit
fi

echo "Auto-remove:"
apt-get -y autoremove
if [ $? != 0 ] ; then
 exit
fi

echo "Auto-clean:"
apt-get autoclean
if [ $? != 0 ] ; then
 exit
fi


if [ -e "/var/run/reboot-required" ]
then
  echo
  echo "Reboot required by "
  cat /var/run/reboot-required.pkgs
fi

# EOF: update
=====

Bob Jonkman <bjonkman at sobac.com>          Phone: +1-519-635-9413
SOBAC Microcomputer Services             http://sobac.com/sobac/
Software   ---   Office & Business Automation   ---   Consulting
GnuPG Fngrprnt:04F7 742B 8F54 C40A E115 26C2 B912 89B0 D2CC E5EA


On 13/08/15 10:57 AM, D. Hugh Redelmeier wrote:
> After my update from Ubuntu 12.04 to 14.04, apt-get tells me that
> there are a lot of packages that apt-get auto-remove could remove.
> 
> Is that safe?  What is the underlying idea?
> 
> I think that it removes things that were added due to dependencies
> where those dependencies no longer exist.  In the back of my mind,
> I worry that sometimes dependencies might be things that I wanted
> independently of why they were installed, but I'm not sure of
> that.
> 
> Do people fine apt-get auto-remove works great or do you find that
> it throws a few babies out with the bathwater? --- Talk Mailing
> List talk at gtalug.org http://gtalug.org/mailman/listinfo/talk
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Ensure confidentiality, authenticity, non-repudiability

iEYEARECAAYFAlXRIIQACgkQuRKJsNLM5eq04gCdEILdUAWtfLjJYF4ieiWb+svx
jdQAnjxVm+u9uw/SQgMklE0wx1Y8feps
=oXa2
-----END PGP SIGNATURE-----


More information about the talk mailing list