5

I have been away for 4 months and when I started Ubuntu again there were 0 updates available. That seems very odd to me. I tried several times and always got that the same result: packages are all up to date. How can that be? Any suggestions?

Ubuntu 20.04.3 LTS - 64-bit - Gnome Version 3.36.8

$ sudo apt update
OK:1 http://archive.ubuntu.com/ubuntu focal InRelease
OK:2 http://archive.canonical.com/ubuntu focal InRelease               
OK:3 https://deb.opera.com/opera-stable stable InRelease               
Paketlisten werden gelesen... Fertig           
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Alle Pakete sind aktuell.
Error404
  • 7,440
Patrick
  • 51
  • 22.04 is around the corner, 4 months with no update is definitely possible. Especially when you seem to have only very few repos enabled. I have security, updates, backports, main, universe in addition to what you have enabled. – emk2203 Jan 23 '22 at 10:46
  • Update the local package information with sudo apt update then upgrade the packages with sudo apt upgrade – moo Jan 23 '22 at 10:52
  • 3
    Restore default repository, I kinda miss focal-updates and focal-security. https://gist.github.com/ishad0w/788555191c7037e249a439542c53e170 – nobody Jan 23 '22 at 13:56
  • 5
  • 2
    Your Ubuntu system did not delete the focal-updates and focal-security sources itself. Whatever reason you had for disabling/deleting those sources, it was unwise. Restore them, and don't do that again. – user535733 Jan 23 '22 at 15:38
  • 1
    Thanks emk2203, Mark, nobody, user535733 and specially Someone for the copy-past command line. The update works now and the sources are complete. I don't know how the sources got deleted or disabled, make me worried about the safety of my computer. How can I check if my system got compromised? – Patrick Jan 25 '22 at 10:08
  • @Patrick Awesome! Glad your sources are complete. You can accept my answer by clicking the checkmark button near the votes if you find it useful. I don't think that any application or programme has disabled the sources, it's done by a human being. Maybe you were following some tutorial and blindly ran a few commands in the terminal? Sometimes, while upgrading or updating the repositories are turned off... Are you having the repositories in sources.list or did you define a custom path for it? System disables the repositories if they are on custom paths while upgrading certain packages. – Error404 Feb 10 '22 at 10:39

1 Answers1

12

There seems to be issues with the repositories. Check if your mirror is up to date. Then follow these steps:

  1. Open Software and Updates app.

    sudo software-properties-gtk
    
  2. As you want ALL the upgrades, I recommend enabling ALL the repositories:

    Enable all repositories.

  3. Then change the mirror to "Main Server".

  4. Update:

    sudo apt update 
    
  5. Then upgrade:

    sudo apt upgrade
    

Here is a one line copy-paste friendly command for the above steps:

sudo mkdir ~/answer && cd ~/answer/ && sudo wget https://gist.githubusercontent.com/ishad0w/788555191c7037e249a439542c53e170/raw/3822ba49241e6fd851ca1c1cbcc4d7e87382f484/sources.list && sudo sed -i "s/focal/$(lsb_release -c -s)/" ~/answer/sources.list && sudo mv ~/answer/sources.list /etc/apt/ && sudo apt update && sudo apt upgrade  && sudo rm -rf ~/answer
Error404
  • 7,440