john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Apt get autoremove cleanup dist upgrade ppa preseed prompts mysql

/boot = 100% used sudo apt-get autoremove # automatically removes unused packages like OLD KERNELS IF there is an error "Unmet dependencies" which requires apt-get -f install AND /boot = 100% used dpkg --purge each old kernel OR rm abi-3.5.0-28-generic; rm config-3.5.0-28-generic; rm initrd.img-3.5.0-28-generic; rm System.map-3.5.0-28-generic; rm vmlinuz-3.5.0-28-generic


for faster moving packages that are not necessarily approved by Ubuntu maintainers

sudo apt-get install python-software-properties # dependency for add-apt-repository sudo add-apt-repository ppa:git-core/ppa

sudo apt-get update # update local package listings of what's available remotely (including any ppa's) sudo apt-get install git-core # installs the latest version of the git-core package (since the ppa has newer, from there)

sudo apt-get install elinks # install the package (command line console based browsing!) ERROR... depends on libmozjs1d...

sudo apt-cache search libmozjs # string search matching remote packages sudo apt-cache show libmozjs185-1.0 # information about the package sudo apt-get install libmozjs elinks -y # auto agree yes to install when prompted

sudo apt-get install elinks # upgrade the package (if a newer version is available)

sudo apt-get install libmozjs185-1.0 elinks -y # install a series of packages (space delimited)

sudo apt-get upgrade # upgrade all packages

sudo apt-get update; apt-get install elinks # upgrade only a single package, FYI ubuntu replaced elinks with w3m


cat /etc/issue apt-get update; apt-get dist-upgrade -y # ensure all packages are latest before upgraded to a new version sudo apt-get install update-manager-core

sudo vi /etc/update-manager/release-upgrades

ensure Prompt=lts

sudo update-manager -d # UI based upgrade from 12.04 to 14.04

do-release-upgrade -d # CLI to upgradefrom Ubuntu 13.04 to 13.10

do-release-upgrade -f DistUpgradeViewNonInteractive # auto do prompt

/etc/apt/sources.list deb http://http.us.debian.org/debian stable main contrib non-free deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org stable/updates main contrib non-free

 apt update
 apt install -sf
 apt keep-all
 apt dist-upgrade       # upgrade your core systems (i.e. 12.04.2 to 12.04.3)

of course you can also just browse: http://ftp.uk.debian.org/debian/ or http://http.us.debian.org/debian and see what they have

e.g. etch, lenny=stable, squeeze=testing for next major release, sid=unstable,


sudo apt-get remove --purge # really remove a package and free up disk space sudo apt-get autoclean sudo apt-get autoremove

sudo apt-get install deborphan (graphical = apt-get install gtkorphan)

deborphan --guess-all

apt-get install ppa-purge ppa-purge xorg-edgers


reading the man on apt-get tells you some interesting differences between apt-get update apt-get upgrade and apt-get dist-upgrade #up to sid/squeeze! unstable


(sudo apt-get -y install debconf-utils)

echo "mysql-server-5.1 mysql-server/root_password password $MYSQL_ROOT_PWD" > mysql.preseed

echo "mysql-server-5.1 mysql-server/root_password_again password $MYSQL_ROOT_PWD" >> mysql.preseed

echo "mysql-server-5.1 mysql-server/start_on_boot boolean true" >> mysql.preseed

cat mysql.preseed | sudo debconf-set-selections

apt-get -y install mysql-server

echo "sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true" >> sun-java6-jre.preseed

cat sun-java6-jre.preseed | sudo debconf-set-selections apt-get install -y sun-java6-jre


  • « unittest command line argument parameter attribute error module object
  • Vi vim hotkeys navigation editing whitespace line numbers »

Published

Mar 7, 2015

Category

linux

~412 words

Tags

  • apt 2
  • autoremove 1
  • cleanup 1
  • dist 2
  • get 22
  • linux 249
  • mysql 18
  • ppa 2
  • preseed 1
  • prompts 1
  • upgrade 7