mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-26 16:48:54 +01:00
Update upgrade-ubuntu.ps1
This commit is contained in:
parent
7380410e28
commit
8f5762c1ac
@ -13,13 +13,13 @@
|
||||
|
||||
try {
|
||||
""
|
||||
"👉 Step 1/4: Perform a backup"
|
||||
"⏳ (1/4) Perform a backup!"
|
||||
"It's strongly recommended to backup your data BEFORE the upgrade!"
|
||||
$Confirm = read-host "Press <Return> to continue..."
|
||||
$Confirm = Read-Host "Press <Return> to continue..."
|
||||
|
||||
""
|
||||
"👉 Step 2/4: Install update-manager-core, Upgrade Packages & Reboot"
|
||||
$Confirm = read-host "Enter <yes> to perform this step (otherwise it will be skipped)"
|
||||
"⏳ (2/4) Install update-manager-core, Upgrade Packages & Reboot"
|
||||
$Confirm = Read-Host "Enter <yes> to perform this step (otherwise it will be skipped)"
|
||||
if ($Confirm -eq "yes") {
|
||||
sudo apt install update-manager-core
|
||||
sudo apt update
|
||||
@ -29,15 +29,15 @@ try {
|
||||
}
|
||||
|
||||
""
|
||||
"👉 Step 3/4: Remove obsolete kernel modules"
|
||||
$Confirm = read-host "Enter <yes> to perform this step (otherwise it will be skipped)"
|
||||
"⏳ (3/4) Remove obsolete kernel modules"
|
||||
$Confirm = Read-Host "Enter <yes> to perform this step (otherwise it will be skipped)"
|
||||
if ($Confirm -eq "yes") {
|
||||
sudo apt --purge autoremove
|
||||
}
|
||||
|
||||
""
|
||||
"👉 Step 4/4: Upgrade Ubuntu & reboot"
|
||||
$Confirm = read-host "Enter <LTS> to upgrade to latest LTS release, <latest> to upgrade to latest Ubuntu release (otherwise this step will be skipped)"
|
||||
"⏳ (4/4) Upgrade Ubuntu & reboot"
|
||||
$Confirm = Read-Host "Enter <LTS> to upgrade to latest LTS release, <latest> to upgrade to latest Ubuntu release (otherwise this step will be skipped)"
|
||||
if ($Confirm -eq "LTS") {
|
||||
sudo do-release-upgrade
|
||||
sudo reboot
|
||||
|
Loading…
Reference in New Issue
Block a user