sudo apt update
command is not working in the terminal in Ubuntu 24.04. Also the Software Updater app is not working, and I'm unable to update my installed software with it.
-
1Please read askubuntu.com/help/how-to-ask and askubuntu.com/help/formatting . Take the tour. Please edit your Question to show us line 1 of the file.– waltinatorCommented Jul 7 at 17:00
1 Answer
The error message Syntax error /etc/apt/apt.conf.d/5lunattended-upgrades-firefox:1: Extra junk after value
indicates a problem with a configuration file related to automatic upgrades.
5lunattended-upgrades-firefox does not seem to be a normal file name because of the letter l after the number 5. Run the cd /etc/apt/apt.conf.d/ && ls
command to check if there is a file named 5lunattended-upgrades-firefox in the /etc/apt/apt.conf.d/
directory.
Open the terminal and type:
sudo nano /etc/apt/apt.conf.d/5lunattended-upgrades-firefox
Look for a line that starts with something like unattended-upgrades. There should be no extra characters including space characters after the value on that line. If there are extra characters, delete them.
Nano text editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.
Run sudo apt update
If this doesn't work delete the 5lunattended-upgrades-firefox file with sudo rm /etc/apt/apt.conf.d/5lunattended-upgrades-firefox && sudo apt update
-
1