Skip to content

Instantly share code, notes, and snippets.

@subimage
Created March 14, 2015 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subimage/74417df6e000a7e24024 to your computer and use it in GitHub Desktop.
Save subimage/74417df6e000a7e24024 to your computer and use it in GitHub Desktop.
Capistrano task to upgrade all servers
namespace :util do
desc "apt software update"
task :apt_upgrade do
run "#{sudo} apt-get update -q"
run %Q\#{sudo} sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade -q -y\
end
end
@subimage
Copy link
Author

Will update / upgrade your server packages. Answers "yes" to everything, except keeps old config files that new packages might want to overwrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment