Skip to main content
more elaborate instructions
Source Link
jarno
  • 6.4k
  • 6
  • 60
  • 86

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. I tried sudo add-apt-repository -r in removing the JOSM repository in Ubuntu 24.04 and it did not work well in my experience. Maybe a newer version of it works better. Anyway, but you can manually remove the files or rename them to have e.g. .save filename postfix or disable some repository in a file.

Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and tryby git using a command given in the repository page. It creates a directory containing the script. RunCopy the script to /usr/local/bin/ and run apt-downgrade -h forfor help.

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. I tried sudo add-apt-repository -r in removing the JOSM repository in 24.04 and it did not work well in my experience, but you can manually remove files or rename them to have e.g. .save filename postfix.

Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and try the script. Run apt-downgrade -h for help.

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. I tried sudo add-apt-repository -r in removing the JOSM repository in Ubuntu 24.04 and it did not work well in my experience. Maybe a newer version of it works better. Anyway, you can manually remove the files or rename them to have e.g. .save filename postfix or disable some repository in a file.

Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository by git using a command given in the repository page. It creates a directory containing the script. Copy the script to /usr/local/bin/ and run apt-downgrade -h for help.

Noted that 'add-apt-repository -r' did not work with JOSM repository
Source Link
jarno
  • 6.4k
  • 6
  • 60
  • 86

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. (I I tried sudo add-apt-repository -r in removing somethe JOSM repository in 24.04 and it did not work well in my experience, but you can manually remove files or rename them to have e.g. .save filename postfix.) 

Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and try the script. Run apt-downgrade -h for help.

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. (I tried sudo add-apt-repository -r removing some repository in 24.04 and it did not work well in my experience, but you can manually remove files or rename them to have e.g. .save filename postfix.) Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and try the script. Run apt-downgrade -h for help.

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. I tried sudo add-apt-repository -r in removing the JOSM repository in 24.04 and it did not work well in my experience, but you can manually remove files or rename them to have e.g. .save filename postfix. 

Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and try the script. Run apt-downgrade -h for help.

Source Link
jarno
  • 6.4k
  • 6
  • 60
  • 86

You could check /etc/apt/sources.list file and *.list and *.sources files in /etc/apt/sources.list.d/ for any non-Ubuntu repositories. Disable/remove the repositories that you want to. In recent Ubuntu releases the default Ubuntu repositories are defined in /etc/apt/sources.list.d/ubuntu.sources so you don't want to remove that. (I tried sudo add-apt-repository -r removing some repository in 24.04 and it did not work well in my experience, but you can manually remove files or rename them to have e.g. .save filename postfix.) Thereafter you just need to sync packages to match the remaining repository definitions. I made a script called apt-downgrade to do the job. It is currently available in my Launchpad git repository. Unfortunately browsing the code does not work currently, but you can clone the repository to download and try the script. Run apt-downgrade -h for help.