2

I mistakenly switched my repositories to Zesty's and upgraded all the packages. Now that I reverted to Yakkety, is there a way I can make apt uninstall all Zesty's packages and reinstall Yakkety's equivalents?

Output of lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
 loop0 7:0 0 115M 0 loop
/snap/vlc/4 loop1 7:1 0 78,3M 0 loop  /snap/core/1441
 sda 8:0 0 1,4T 0 disk
 ├─sda1 8:1 0 500M 0 part
 ├─sda2 8:2 0 683,6G 0 part /mnt/Windows 
 ├─sda3 8:3 0 1K 0 part 
 ├─sda5 8:5 0 643,9G 0 part / 
 ├─sda6 8:6 0 7,9G 0 part [SWAP] 
 └─sda7 8:7 0 61,5G 0 part 
sr0 11:0 1 1024M 0 rom

Output of uname -a:

Linux tommy-S551LB 4.10.6 #1 SMP Tue Mar 28 20:29:54 CEST 2017 x86_64
x86_64 x86_64 GNU/Linux

Output of lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Zesty Zapus (development branch)
Release:    17.04
Codename:   zesty
Tommaso Thea
  • 319
  • 1
  • 4
  • 14

2 Answers2

0

I don't know how safe it is to automatize such a thing as reinstalling a massive amount of packages, so here's a manual approach:

Get a list of all the packages from Zesty:

apt list --installed | grep zesty > ~/Desktop/packages-to-reinstall.txt

Or do instead

apt list --installed | grep 17.04 > ~/Desktop/packages-to-reinstall.txt

Reinstall them using:

sudo apt-get install --reinstall <package_name>
M. Becerra
  • 3,538
  • 5
  • 24
  • 40
0

You should reinstall Yakkety from scratch. Release downgrades are unsupported for a reason. See How to roll back Ubuntu to a previous version?.

David Foerster
  • 36,890
  • 56
  • 97
  • 151