Delete old version of ubuntu
Ubuntu 16.04 and 18.04 were on my hard disk, when I installed Ubuntu 20.04 a few months ago. I selected the option to remove all previous versions. Version 18.04 was erased when 20.04 was installed; however 16.04 persisted and still appears in the boot list at start-up. How do I completely remove 16.04, so there is only one large partition with 20.04?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- actionparsnip
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
What is the output of:
sudo dpkg -l | grep linux-image; df -h
Thanks
Revision history for this message
|
#2 |
rc linux-image-
rc linux-image-
rc linux-image-
rc linux-image-
rc linux-image-
rc linux-image-
rc linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 1.9M 3.2G 1% /run
/dev/sda5 916G 28G 842G 4% /
tmpfs 16G 25M 16G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop2 9.2M 9.2M 0 100% /snap/canonical
/dev/loop0 55M 55M 0 100% /snap/core18/1880
/dev/loop4 162M 162M 0 100% /snap/chromium/1320
/dev/loop5 98M 98M 0 100% /snap/core/9993
/dev/loop7 164M 164M 0 100% /snap/spotify/41
On Wednesday, October 14, 2020 13:45 EDT, actionparsnip <email address hidden> wrote:
Your question #693467 on Ubuntu changed:
https:/
Status: Open => Needs information
actionparsnip requested more information:
What is the output of:
sudo dpkg -l | grep linux-image; df -h
Thanks
-- To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#3 |
Looks ok, run:
sudo dpkg -P `dpkg -l | grep ^rc | awk {'print $3'}`
Should remove any packages with residual configuration files and remove those kernels for you.
If you then reboot:
sudo reboot
Is it better?
Revision history for this message
|
#4 |
This is the output after running the last dpkg command.
Package 5.4.0-26.30 listed more than once, only processing once.
Package 5.4.0-33.37 listed more than once, only processing once.
Package 5.4.0-37.41 listed more than once, only processing once.
Package 5.4.0-39.43 listed more than once, only processing once.
Package 5.4.0-40.44 listed more than once, only processing once.
Package 5.4.0-42.46 listed more than once, only processing once.
Package 5.4.0-45.49 listed more than once, only processing once.
dpkg: warning: ignoring request to remove 5.4.0-26.30 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-33.37 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-37.41 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-39.43 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-40.44 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-42.46 which isn't installed
dpkg: warning: ignoring request to remove 5.4.0-45.49 which isn't installed
After rebooting, the grub screen shows:
Ubuntu
* Advanced options for Ubuntu
Memory test (memtest86t)
Memory test (memtest86t serial console 115200)
Ubuntu 16.04.6 LTS (16.04) (on /dev/mapper/
Advanced options for Ubuntu 16.04 LTS (16.04) (on /dev/mapper/
On Wednesday, October 14, 2020 14:30 EDT, actionparsnip <email address hidden> wrote:
Your question #693467 on Ubuntu changed:
https:/
Status: Open => Answered
actionparsnip proposed the following answer:
Looks ok, run:
sudo dpkg -P `dpkg -l | grep ^rc | awk {'print $3'}`
Should remove any packages with residual configuration files and remove
those kernels for you.
If you then reboot:
sudo reboot
Is it better?
-- If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#5 |
If you boot as normal and run:
lsb_release -a; uname -a
What is the output please?
Revision history for this message
|
#6 |
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Linux study 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
On Wednesday, October 14, 2020 15:05 EDT, actionparsnip <email address hidden> wrote:
Your question #693467 on Ubuntu changed:
https:/
Status: Open => Needs information
actionparsnip requested more information:
If you boot as normal and run:
lsb_release -a; uname -a
What is the output please?
-- To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#7 |
Looks ok to me. I'm guessing the GRUB thing is just cosmetic
Revision history for this message
|
#8 |
You could look in /etc/grub.d to see where it's being set but ultimately Focal is booting OK
Revision history for this message
|
#9 |
Thanks actionparsnip, that solved my question.
Revision history for this message
|
#10 |
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 916G 28G 842G 4% /
and
Ubuntu 16.04.6 LTS (16.04) (on /dev/mapper/
Apparently there are two separate installations of Ubuntu on your hard disk(s).
Ubuntu 20.04 on /dev/sda5
and
Ubuntu 16.04 on a logical volume group.
What is the output of the command
sudo fdisk -l
Revision history for this message
|
#11 |
Disk /dev/loop0: 162.89 MiB, 170778624 bytes, 333552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 97.6 MiB, 101777408 bytes, 198784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 97.72 MiB, 102445056 bytes, 200088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 55.33 MiB, 58007552 bytes, 113296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 239.10 MiB, 251637760 bytes, 491480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 9.7 MiB, 9510912 bytes, 18576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 54.98 MiB, 57626624 bytes, 112552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 161.102 MiB, 169861120 bytes, 331760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-00W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdfba0922
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 1953523711 1952471042 931G 5 Extended
/dev/sda5 1052672 1953523711 1952471040 931G 83 Linux
Partition 2 does not start on physical sector boundary.
Disk /dev/sdb: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk model: PNY CS1311 240GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x57a1be9f
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 999423 997376 487M 83 Linux
/dev/sdb2 1001470 468860927 467859458 223.1G 5 Extended
/dev/sdb5 1001472 468860927 467859456 223.1G 8e Linux LVM
Disk /dev/mapper/
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop8: 161.42 MiB, 169254912 bytes, 330576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 50.69 MiB, 53133312 bytes, 103776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 217.92 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 62.9 MiB, 65105920 bytes, 127160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop12: 169.31 MiB, 177528832 bytes, 346736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop13: 163.68 MiB, 171618304 bytes, 335192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop14: 30.95 MiB, 32432128 bytes, 63344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop15: 290.45 MiB, 304545792 bytes, 594816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop16: 255.58 MiB, 267980800 bytes, 523400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop17: 30.27 MiB, 31735808 bytes, 61984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop18: 43.16 MiB, 45248512 bytes, 88376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
On Thursday, October 15, 2020 03:05 EDT, Manfred Hampl <email address hidden> wrote:
Your question #693467 on Ubuntu changed:
https:/
Manfred Hampl posted a new comment:
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 916G 28G 842G 4% /
and
Ubuntu 16.04.6 LTS (16.04) (on /dev/mapper/
Apparently there are two separate installations of Ubuntu on your hard disk(s).
Ubuntu 20.04 on /dev/sda5
and
Ubuntu 16.04 on a logical volume group.
What is the output of the command
sudo fdisk -l
-- You received this question notification because you asked the question.
Revision history for this message
|
#12 |
My interpretation of your output:
Ubuntu 20.04 is on /dev/sda5 (a partition on the first hard disk) and
Ubuntu 16.04 is on /dev/sdb5 (inside a logical volume group on the second hard disk).
These are two different hard disks.
The easiest way to remove all traces of Ubuntu 16.04 is detaching the second hard disk (and running "sudo update-grub").
The aim of combining the space of Ubutnu 20.04 and 16.04 to one large pool can be acheived only with advanced formatting techniques and will probably require a complete new installation of Ubuntu 20.04.
Revision history for this message
|
#13 |
OK. I suspected as much. Thanks.
On Thursday, October 15, 2020 08:01 EDT, Manfred Hampl <email address hidden> wrote:
Your question #693467 on Ubuntu changed:
https:/
Manfred Hampl posted a new comment:
My interpretation of your output:
Ubuntu 20.04 is on /dev/sda5 (a partition on the first hard disk) and
Ubuntu 16.04 is on /dev/sdb5 (inside a logical volume group on the second hard disk).
These are two different hard disks.
The easiest way to remove all traces of Ubuntu 16.04 is detaching the second hard disk (and running "sudo update-grub").
The aim of combining the space of Ubutnu 20.04 and 16.04 to one large pool can be acheived only with advanced formatting techniques and will probably require a complete new installation of Ubuntu 20.04.
-- You received this question notification because you asked the question.