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