Jumat, 30 Juni 2023

How to Remove Software Repositories from Ubuntu

How to Remove Software Repositories from Ubuntu

You can add external repositories in Ubuntu to access packages unavailable in the official repositories.

For example, if you install Brave browser in Ubuntu, you add its repository to your system. If you add a PPA, that is added as an external repository too.

When you don't need the specific software, you remove it. However, the external repository is still added. You can, and you should also remove it to keep your system pristine.

Ubuntu lets you remove a software repository easily. There are different ways to do that:

  1. Using apt-add-repository command to remove the repository
  2. Using GUI to remove the repository (for desktop users)
  3. By modifying the file contents of the /etc/apt/sources.list file (for experts)

But before that, I highly advise getting familiar with the concept of package managers and repositories if you are new to this concept.

What is a Package Manager in Linux?
Learn about packaging system and package managers in Linux. You’ll learn how do they work and what kind of package managers available.
How to Remove Software Repositories from Ubuntu

Method 1. Remove the repository using apt 🤖

Did you know you can also use the apt command to remove repositories? Well, technically, it's not part of the core apt command but it works in similar fashion.

You can use the add-apt-repository or apt-add-repository commands (both represent the same command) while dealing with external repositories.

First, list the added repositories using the following command:

apt-add-repository --list
How to Remove Software Repositories from Ubuntu

Once done, you can use the apt-add-repository command with the -r flag in shown manner to remove the directory:

sudo apt-add-repository -r repo_name

For example, if I want to remove the yarn repository, I would have to use the following command:

sudo add-apt-repository -r deb https://dl.yarnpkg.com/debian/ stable main
How to Remove Software Repositories from Ubuntu

Press the Enter key for confirmation.

Next, update the repositories using the following:

sudo apt update

And now, if you list enabled repositories, you won't find the removed repository here:

apt-add-repository --list
How to Remove Software Repositories from Ubuntu

There you have it!

Using apt Commands in Linux [Ultimate Guide]
This guide shows you how to use apt commands in Linux with examples so that you can manage packages effectively.
How to Remove Software Repositories from Ubuntu

Method 2. Remove the software repository in Ubuntu using GUI 🖥️

🚧
Removing a repository you know nothing about is not recommended as it may restrict you from installing your favorite package in the future, so make sure you know what you are up to.

Being one of the best distros for beginners, You can use GUI to remove the repository without needing the terminal.

To do so, first, open the software and updates the app from the system menu:

How to Remove Software Repositories from Ubuntu

Now, click on Other Software section, and it will list PPAs and external repositories in your system.

The ones listed as checked ✅ are enabled ones.

To remove a repository, you'd have to follow three simple steps:

  • Select a repository that needs to be removed
  • Click on the remove button
  • And finally, hit the close button
How to Remove Software Repositories from Ubuntu

Once you click on the close button, it will open a prompt asking you to update the information as you make changes.

Simply click on the Reload button:

How to Remove Software Repositories from Ubuntu

Alternatively, you can update the repository from the command line to take effect from the changes:

sudo apt update

Method 3. Remove the repository by removing its directory (for experts 🧑‍💻)

Previously, I explained how you could use tools (GUI and CLI) to remove a repository; here, you will modify the system directory (/etc/apt/sources.list.d) responsible for managing repositories.

So first, change your working directory to sources.list.d and list its contents:

cd /etc/apt/sources.list.d/ && ls
How to Remove Software Repositories from Ubuntu

Here, you will find the list of all the repositories.

If you notice carefully, there will be two files for one repo. Once with the .list extension and one with the .save extension.

You will have to remove the one having the .list extension:

sudo rm Repo_name.list

For example, here, I removed the node repo using the command below:

sudo rm nodesource.list
How to Remove Software Repositories from Ubuntu

To take effect from the changes, update the repository index with:

sudo apt update

Want to know more about the sources.list? Read this article.

What is the Use of sources.list File in Ubuntu Linux?
Understanding the concept of sources.list in Ubuntu will help you understand and fix common update errors in Ubuntu.
How to Remove Software Repositories from Ubuntu

Additional Step: Remove GPG keys after removing the repository (for advanced users)

If you wish to remove the GPG keys after removing the repository, here's how you do it.

First, list the existing GPG keys using the following command:

apt-key list

Now, the output may seem confusing to some users.

Here's what to remember:

  • The GPG key name will be placed above the dashed line (----)
  • The public key is in the second line

For example, here's the relevant data of the Chrome GPG key:

How to Remove Software Repositories from Ubuntu

To remove the GPG key, you can use the last two strings of the public key (without any space).

For example, here's how I will remove the GPG key of the Chrome browser using the last two strings of its public key (D38B 4796):

sudo apt-key del D38B4796
How to Remove Software Repositories from Ubuntu

Similarly, you can also use the entire public key. But this time, you have to include spaces between two strings, as shown:

sudo apt-key del "72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310"

Careful with what you add and what you remove

Especially when you are a new Linux user, you will encounter many exciting things and repositories you will add and remove.

While it is good to experiment, you should always be careful about anything you add/remove to your system. You should keep some things in mind, like: Does it include updated packages? Is it a trusted or maintained repository?

Being cautious will keep your system free from unnecessary repositories and packages.

I hope this guide helps you remove the repository you do not want!

Feel free to let me know if you face any issues in the comments below, and consider joining our It's FOSS Community forum to get faster help!



from It's FOSS https://ift.tt/0O7vRpi
via IFTTT

How to Install Wine in Ubuntu

How to Install Wine in Ubuntu

With some effort, you can run Windows applications on Linux using Wine. Wine is a tool you can try when must use an Windows-only application on Linux.

Please note that you CANNOT run any Windows games or software with Wine. Please go through the database of supported applications. The software rated platinum or gold have a higher chance of running smoothly with Wine.

If you have found a Windows-only software that Wine supports well and now looking to use it, this tutorial will help you with the Wine installation on Ubuntu.

💡
If you have Wine installed before, you should remove it completely to avoid any conflict. Also, you should refer to its download page for additional instructions for specific Linux distributions.

Installing Wine on Ubuntu

There are various ways to install Wine on your system. Almost all the Linux distros come with Wine in their package repository.

Most of the time, the latest stable version of Wine is available via the package repository.

  1. Install WINE from Ubuntu’s repository (easy but may not be the latest version)
  2. Install WINE from Wine’s repository (slightly more complicated but gives the latest version)

Please be patient and follow the steps one by one to install and use Wine. There are several steps involved here.

🚧
Keep in mind that Wine installs too many packages. You will see a massive list of packages and install sizes of around 1.3 GB.
How to Install Wine in Ubuntu
Wine download and installed size

Method 1. Install WINE from Ubuntu (easy)

Wine is available in Ubuntu's Official repositories, where you can easily install it. However, the version available this way may not be the latest.

Even if you are using a 64-bit installation of Ubuntu, you will need to add 32-bit architecture support on your distro, which will benefit you in installing specific software.

Type in the commands below:

sudo dpkg --add-architecture i386

Then install Wine using:

sudo apt update
sudo apt install wine

Method 2: Install the latest version from Wine’s repository

Wine is one such program that receives heavy developments in a short period. So, it is always recommended to install the latest stable version of Wine to get more software support.

First, remove any existing Wine installation.

Step 1: Make sure to add 32-bit architecture support:

sudo dpkg --add-architecture i386

Step 2: Download and add the repository key:

sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

Step 3: Now download the WineHQ sources file.

🚧
This step depends on the Ubuntu or Mint version you are using. Please check your Ubuntu version or Mint version. Once you have that information, use the commands for your respective versions.

For Ubuntu 23.04 Lunar Lobster, use the command below:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources

If you have Ubuntu 22.04 or Linux Mint 21.X series, use the command below:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources

If you are running Ubuntu 20.04 or Linux Mint 20.X series, use:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources

Ubuntu 18.04 or Linux Mint 19.X series users can use the command below to add the sources file:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources

Once done, update the package information and install the wine-stable package.

sudo apt install --install-recommends winehq-stable

If you want the development or staging version, use winehq-devel or winehq-staging respectively.

Initial Wine configuration

Once Wine is installed, run the following:

winecfg

This will create the virtual C: Drive for installing Windows applications.

How to Install Wine in Ubuntu
C: Drive in Nautilus File Manager

While following these steps, sometimes, you may not find the “Open With Wine Windows Program Loader” option in Nautilus right-click menu.

In that case, fix it by creating a soft link to appropriate directory:

sudo ln -s /usr/share/doc/wine/examples/wine.desktop /usr/share/applications/

And restart your system to get the change.

Using Wine to run Windows applications

Once you have installed Wine and configured it by running winecfg, now is the time to install Windows apps.

Here, the 7Zip.exe file is used for demonstration purposes. I know I should have used a better example, as 7Zip is available on Linux. Still, the process remains the same for other applications.

Firstly, download the 7Zip .exe file from their official downloads page.

Now, right-click on the file and select "Open With Wine Windows Program Loader" option:

How to Install Wine in Ubuntu
Open EXE file with Wine Program loader

This will prompt us to install the file. Click Install and let it complete. Once done, you can open the 7zip like any other native app.

How to Install Wine in Ubuntu
7Zip in Ubuntu Activities Overview

You can use wine uninstaller command to uninstall any installed application.

Here's a dedicated tutorial on using Wine to run Windows software on Linux:

Run Windows Applications on Linux [Beginners Guide]
Here’s a detailed step-by-step guide with screenshots to show how you can run Windows software on Linux using Wine.
How to Install Wine in Ubuntu

Remove Wine from Ubuntu

If you don't find Wine interesting or if Wine doesn't run the application you want properly, you may need to uninstall Wine. To do this, follow the below steps.

Remove Wine installed through the Ubuntu repository

To remove wine installed through repositories, first run:

sudo apt remove --purge wine

Update your package information:

sudo apt update

Now, use the autoclean command to clear the local repository of retrieved package files that are virtually useless.

sudo apt-get autoclean
sudo apt-get clean

Remove those packages that are installed but no longer required using:

sudo apt autoremove

Now reboot the system.

Remove Wine installed through the Wine repository

Remove the installed wine-stable package.

sudo apt remove --purge wine-stable

Update your package information:

sudo apt update

Now, use the autoclean and clean command to clear the local repository of retrieved package files that are virtually useless.

sudo apt-get autoclean
sudo apt-get clean

Now remove the sources file added earlier. Use your respective distribution folder. Here, Ubuntu 22.04 is used.

sudo rm /etc/apt/sources.list.d/winehq-jammy.sources

Once this is removed, update your system package information:

sudo apt update

Optionally, remove the key file you had added earlier if you want.

sudo rm /etc/apt/keyrings/winehq-archive.key

Now remove any residual files manually.

Still have questions about using Wine?

You may also go through our tutorial on using Wine. It should answer some more questions you might have.

Run Windows Applications on Linux [Beginners Guide]
Here’s a detailed step-by-step guide with screenshots to show how you can run Windows software on Linux using Wine.
How to Install Wine in Ubuntu

There is no place better than the Wine Project website. They have a dedicated FAQ (frequently asked questions) page:

If you still have questions, you can browse through their wiki for detailed documentation or ask your doubts in their forum.

Alternatively, if you don't mind spending some money, you can opt for CrossOver. It's basically Wine but with premium support. You can also contact their team for your questions.

Purchase CrossOver Through the CodeWeavers Store Today!
Buy CrossOver Mac and CrossOver Linux through the CodeWeavers store. Choose from 12 month and lifetime license plans. Renewals are also available for purchase.
How to Install Wine in Ubuntu
Wine with support, your purchase supports wine development (affiliate link)

In my opinion, you should resort to Wine only when you cannot find an alternative to the software you must use. Even in that case, it's not guaranteed to work with Wine.

And yet, Wine provides some hope for Windows migrants to Linux.



from It's FOSS https://ift.tt/iqp73n5
via IFTTT

Rabu, 28 Juni 2023

FOSS Weekly #23.26: Linux Kernel 6.4 Red Hat Lock Down Exodia OS and More

FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

Red Hat made a decision to restrict access to its source code for paying customers only. This move is likely to 'kill' projects like Rocky Linux and Alma Linux that have filled the void left by CentOS (also killed by Red Hat).

The reason, in my opinion, is that Red Hat doesn't want paying (enterprise) clients to go for its clones like Rocky and Alma Linux. From CentOS discontinuation to this, the move is money-inspired.

💬 Let's see what else you get in this edition of FOSS Weekly:

  • Continuation of our Bash Basics series
  • Exodia OS, an alternative to Kali Linux
  • A new non-LTS Linux Kernel was released recently
  • And other Linux news, videos, and, of course, memes!

📰 Linux news

Linux Kernel 6.4 was recently released as a non-LTS release with many upgrades.

Linux Kernel 6.4 Released: Embracing Apple M2, New Hardware, and More Rust Code
It’s a new Linux Kernel release day! Hardware enthusiast? Dive in to learn more what Linux Kernel 6.4 brings in.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🧠 What we’re thinking about

Software Freedom Conservancy thinks that Red Hat's decision to restrict access to source code for paying customers may have violated GPL.

A Comprehensive Analysis of the GPL Issues With the Red Hat Enterprise Linux (RHEL) Business Model
This article was originally published primarily as a response to IBM’s Red Hat’s change to no longer publish complete, corresponding source (CCS) for RHEL and the prior discontinuation of CentOS Linux (which are related events, as described below). We hope that this will serve as a compre…
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🧮 Tutorials

In the third installment of our Bash Basics series, you will learn how to pass arguments to bash scripts and make them interactive.

Bash Basics #3: Pass Arguments and Accept User Inputs
Learn how to pass arguments to bash scripts and make them interactive in this chapter of the Bash Basics series.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

The Terminal Tuesday continues with the cat command.

Using cat Command in Linux
Cat command can be used for more than just displaying file contents.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

Xfce user? Here are some theme suggestions for you.

11 Themes to Make Xfce Look Modern and Beautiful
Xfce desktop looks outdated? No worries. Here are some of the best themes to make your Xfce desktop look beautiful.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

📹 What we are watching

Gedit can be turned into Gedit++ with some simple tips and tweaks.


✨ Project highlights

We recently tested out a Kali Linux alternative that can be used for pen testing purposes.

Exodia OS is a Linux Distro for Cybersecurity Enthusiasts
A new alternative to Kali Linux fans. What do you think?
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

Reddit's controversial API changes have resulted in the rise of alternative platforms, one such undertaking is Lemmy.

Lemmy: A Decentralized Open-Source Reddit Alternative To Explore
Are you looking for an open-source Reddit alternative? Well, this is something!
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🧩 Puzzle (for Pro members only)

Uncover the names of various Linux distributions that offer alternatives to the systemd init system.

Puzzle of The Week: Word Search #3: Systemd-free Linux Distributions
Exercise those ‘little gray cells’ of yours and solve this puzzle.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🛍️ Interesting deal for you

Internxt is offering 2 TB cloud storage for a mere €10.79 a year as part of their summer sale. (WILL BE OVER IN 2 DAYS!)

Internxt Pricing – Get Up To 10GB Free!
Sign up for an Internxt secure cloud storage subscription and get access to our monthly newsletter filled with the latest tech news and updates.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

💡 Quick handy tip

You can enable autosave feature in Gedit from Preferences -> Editor. By default, it autosaves every 10 minutes but you can change the duration to your liking.

It won't work with a brand new text file that has never been saved before.

FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🤣 Meme of the week

Why fight among ourselves when we can unite against close-source operating systems?

FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

🗓️ Tech Trivia

The iconic video game company, Atari, was founded by Nolan Bushnell and Ted Dabney on June 27, 1972. Their first and hugely successful game, Pong, led to the start of the video game industry.

Did you own an Atari?


🧑‍🤝‍🧑 FOSSverse corner

An interesting thread where Community members share why they switched to Linux.

Windows refugees, why have you changed to Linux?
The difference is, in Linux one can fix things. Linux may have more things to fix, but at least you are not powerless.
FOSS Weekly #23.26: Linux Kernel 6.4, Red Hat Lock Down, Exodia OS and More

Come, share your thoughts, too.


❤️ Enjoying FOSS Weekly?

Forward it to Linux-using friends and encourage them to subscribe (hint: it's here).

Become a Pro member and show your support 🙏

Share your views and opinion on 11 years of It's FOSS (I may include it on It's FOSS testimonial pages).

Something else? Share it with me by pressing the reply button.

Don't stop loving It's FOSS :)



from It's FOSS https://ift.tt/9FWdLvZ
via IFTTT