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
3
  • 2
    Welcome to AskUbuntu! Doing this en masse sounds like a hazardous plan. There's a great deal here that's unclear to me. For one, you state that you've reverted to Yakkety do you mean you've just changed the sources list (repositories)? Did you by any chance make a backup prior to your accidental switch to Zesty repositories? Do you have a backup of your current situation? Please edit the output of lsblk into your post so that we atleast have some idea of the layout of your system. I'm hoping there's a safer more reasonable approach than what you suggest.
    – Elder Geek
    Mar 31, 2017 at 21:56
  • In future please edit information into your post rather than putting it in a comment. Comments can be deleted for various reasons. I've done it for you this time. You'll notice it's a lot easier to read. Thank you for helping us help you! I'm still waiting for answers to the remaining questions I asked here The best way to receive good answers to your questions here is to respond to requests for information from the team via post edit
    – Elder Geek
    Apr 1, 2017 at 0:29
  • @DavidFoerster Added what you asked to the question, thanks for looking into my problem. Apr 1, 2017 at 16:55

2 Answers 2

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>
9
  • Hey, I'm confused, I opened packages-to-reinstall.txt but it contains this: ubuntu-wallpapers-zesty/now 17.04.1-0ubuntu1 all [installed,local] Mar 31, 2017 at 20:58
  • Yes! That's it, also I issued apt list --installed, the only package which seems to be installed from zesty is that one. How is this possible, the day earlier I had nothing to upgrade, and I upgraded like 2000 packages, I'm not kidding. How is this possible? The "details" built in program says I'm in ubuntu 16.10, but when I get the "ubuntu has experienced an internal error" it says UBUNTU 17.04, screenfetch says I'm on 17.04 too. Is that package particular or something? Mar 31, 2017 at 21:10
  • Wait! I just noticed that almost all packages (maybe everyone) has 17.04 in it's name! Example: "unity-schemas/now 7.5.0+17.04.20170301-0ubuntu1 all [installed,local]" Mar 31, 2017 at 21:12
  • As you can see, it says 17.04 Mar 31, 2017 at 21:12
  • This is the output (I deleted the old file): Mar 31, 2017 at 23:10
0

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

2
  • I'll upgrade to zesty when the final version is released. If it comes down to this I'd rather wait 2 weeks and let everything get fixed with upgrades than reinstalling and then upgrading Apr 1, 2017 at 19:10
  • 1
    Yes, that's another worthwhile course of action depending on your needs. Apr 1, 2017 at 20:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .