Uninstall Opera from Kali Linux, Leftovers Included
To remove Opera from Kali Linux, open a terminal and run sudo apt purge opera-stable, then sudo apt autoremove. That is the program gone. But it is not the whole job, and this is the part every other guide leaves out: the Opera installer added its own software repository and signing key to your system, and removing the package does not remove either — so your machine keeps contacting Opera's servers on every apt update. And your profile, with its saved passwords, cookies and history, is still sitting in your home folder, because package tools never delete anything from there. Three leftovers, three commands, five minutes.
The browser that was gone, and the passwords that were not
Jake had a spare laptop in the shop running Kali — the one he uses for his security course — and he was about to lend it to a customer's son for a week.
He had installed Opera on it months earlier, decided he preferred it for one thing and never used it again, and it had sat there since. So before handing the machine over he removed it, the way the internet told him to, and considered the matter closed.
"Did you delete the profile?" Ethan asked.
"The what?"
"The folder in your home directory with everything the browser saved. Package tools never touch your home directory — that's deliberate, it's so an upgrade can't eat your documents. Which means when you remove a browser, everything it saved about you stays exactly where it was. Bookmarks, cookies, history. Saved logins."
A pause. "Was my shop email logged into that one?"
"That's the question, isn't it."
Nobody had done anything wrong. Removing the package genuinely removes the browser, and Jake's machine no longer had Opera on it in any meaningful sense. But "the program is gone" and "the data is gone" are two different statements, and on a machine you are lending, selling or handing to somebody else, it is the second one that matters.
So here is the whole job rather than the first fifth of it.
Step 1: find out what the package is actually called
Opera ships three separate packages — stable, beta and developer — and they can all be installed side by side. Removing one leaves the others exactly where they were, which is the most common reason somebody removes Opera and still finds Opera in their menu.
So list what is actually on the machine first:
dpkg is the low-level tool that keeps the list of installed packages, -l asks it to list them, and grep -i opera filters that list down to lines mentioning Opera, ignoring capitalization. If you are new to the difference between dpkg and apt, our post on what apt and dpkg actually are explains why there are two of them at all.
Each line you get back starts with a two-letter status code. ii means installed and configured, which is the normal state. rc means the program was removed but its configuration files are still there — if you see that, somebody already ran a plain remove here and the purge below will finish the job.
The package name is the second column. Write down every Opera name you see, because you need to remove all of them.
Step 2: remove the program properly
Close any Opera windows first, then:
sudo apt autoremove
Substitute whatever name step 1 gave you. If more than one is installed, list them together: sudo apt purge opera-stable opera-beta.
Why purge rather than remove
apt remove deletes the program and keeps its system-wide configuration, so that reinstalling later picks up your settings. apt purge deletes the configuration too. For a browser you have finished with, purge is the right call — leaving configuration behind for a program you will never reinstall is just clutter.
Neither of them touches your home directory. Remember that for step 4.
Why not sudo dpkg -r opera-stable
Because it does less than you think, and this is worth being straight about: it is the command our own 2019 version of this post recommended, and it was incomplete on the day we published it.
dpkg -r removes exactly one package and nothing else. It keeps the configuration, ignores anything that was installed alongside it, and knows nothing about the repository the installer added. It is not wrong, and it will remove the browser. It just leaves the rest of the mess behind, and it has no idea the rest of the mess exists.
apt sits on top of dpkg and handles the surrounding work. Use apt to install and remove things; keep dpkg for looking at what is there.
Read the autoremove list before you confirm
apt autoremove clears out libraries that were installed as dependencies and are no longer needed by anything. After removing a browser, that is usually a handful of small packages and it is entirely safe.
Read the list anyway. If autoremove proposes removing something that is obviously part of your desktop or a tool you actually use, press n and stop. That pattern almost always means a metapackage was removed at some point and apt now believes half the system is unwanted — a bad five seconds to be typing y into.
Step 3: the repository and the key, which nothing removes for you
Here is the leftover that produces the "I removed Opera, why is apt still talking about Opera" question.
Browsers distributed as downloadable packages need a way to update themselves. Rather than build a separate updater, they add their own software repository to your system at install time, so that your normal system updates keep the browser current. It is a sensible design and every one of them does it — Chrome, Brave, Vivaldi and Opera alike.
Removing the package does not remove the repository. So your machine keeps contacting Opera's servers on every update check, forever, for software you no longer have. When the repository's signing key eventually expires, you start getting signature warnings about a browser you removed months ago — and by then nobody remembers why.
Find and delete the repository file
You are looking for something like opera-stable.list. Delete it:
One thing that has changed recently and trips people up: Kali moved its own package sources to a newer file format, so on a current installation that directory contains kali.sources alongside any third-party .list files. Two formats, same folder, both valid. Third-party installers like Opera's still write the older .list style, so that is what you are hunting for — and leave kali.sources alone, since that is where all your actual software comes from. Delete that one by mistake and your updates stop, which is the point at which routine jobs like updating Metasploit start failing for reasons that look nothing like the cause. If you are unsure which release you are on, our guide to checking your Kali version answers it in one command.
Then the signing key
The repository came with a key that tells your system its packages are genuine. Different versions of Opera's installer have put it in different places, so check both:
ls /usr/share/keyrings/
Delete any Opera-named file you find with sudo rm. Then confirm the whole thing worked:
Watch the list of servers it contacts as it runs. No Opera line means the repository is genuinely gone. This is the check that proves the removal, and it takes ten seconds.
Note: Opera's packaging has moved its signing key between two directories over the years and a guide naming only one of them will send you looking in an empty folder as our research. That is why this post tells you to ls both and delete whatever you find, instead of handing you a single path to copy blindly. Package names, likewise: opera-stable is the usual one, and the post is built so that a different name costs you nothing.
Step 4: your profile, and why this is the important one
Package managers never delete files from a user's home directory. That is deliberate and it is a good rule — it means no upgrade, however badly it goes, can eat your documents.
It also means that after every uninstall guide on the internet has finished, your entire browser profile is still on the disk. For Opera that is:
~/.cache/opera # cached pages and images
The ~ is shorthand for your home folder, and the leading dot makes those folders hidden, which is why you have never noticed them. Have a look before you delete anything:
du -sh ~/.config/opera ~/.cache/opera
The second command tells you how much space they are taking, which on a browser used for a few months is often a surprising amount.
If you want your bookmarks first, start the removal before uninstalling next time and export them from inside Opera. If it is already gone, the bookmarks file is still in that folder and can be read or imported by another browser.
When you are ready:
⚠️ Look at that command twice before you run it
rm -rf deletes recursively and without asking. It is the correct tool here and it is unforgiving of typing mistakes — a stray space in the wrong place makes it delete something quite different. Read the line, check it says opera in both places, then run it.
No sudo is needed. These are your own files, and if a command telling you to delete things in your home directory demands sudo, that is a sign to slow down rather than to type your password.
One more, if other people have accounts on this machine: each user has their own profile. Deleting yours does nothing about theirs. On a shared or handed-on machine, check /home/ for other accounts and repeat the step, or remove the account entirely if it is no longer needed.
Step 5: prove it is gone
Three commands, and all three should come back empty:
which opera # nothing on your path
ls /etc/apt/sources.list.d/ # no opera source file
If which opera still returns a path after all of this, you did not install it from a package at all — see the next section.
Worth doing this properly rather than assuming. "I think I removed it" and "three commands say it is gone" are different states of knowledge, and on a machine you are about to hand to somebody else, only one of them is worth anything.
If you did not install it with apt
Three other ways Opera might have arrived, each with its own removal. which opera usually tells you which one you are dealing with by where the path points.
Flatpak
flatpak uninstall com.opera.Opera
flatpak uninstall --unused
The last line clears the shared runtimes that were pulled in for it and are now used by nothing — often the largest part of the disk space. Flatpak keeps its own per-application data separately under ~/.var/app/, so check there for a leftover Opera folder as well.
Snap
sudo snap remove opera
Kali does not ship snap by default, so if this is how it got installed, you set that up at some point and may want to consider whether you still need snap itself.
Unpacked by hand from an archive
If which opera points at somewhere like /opt/ or a folder in your home directory, and dpkg has never heard of it, then it was extracted rather than installed. There is nothing for a package manager to do: delete the folder, and delete any desktop launcher pointing at it, which will be a .desktop file in ~/.local/share/applications/ or /usr/share/applications/.
The two things you will notice afterwards
Links stop opening, if Opera was your default
When you click a link in a mail client or a terminal, the system asks the default browser to open it. Remove that browser and nothing answers.
Kali ships with Firefox ESR, so the fix is one line:
If that name does not match what is on your system, ls /usr/share/applications/ | grep -i firefox will show you the right one.
A menu entry that launches nothing
Desktop menus cache their contents. If Opera is still listed after removal, log out and back in, and the entry disappears. If it genuinely persists, there is a stray .desktop file — look in ~/.local/share/applications/ first, since that is the per-user location and the one package removal never touches.
If something goes wrong mid-removal
Occasionally a removal stops partway and you get a message about dpkg having been interrupted, telling you to run a configure command to correct the problem. Do exactly that, followed by sudo apt --fix-broken install, before touching anything else — our post on the dpkg was interrupted error covers the recovery in full. Forcing your way past a half-configured package is how a five-minute job becomes a reinstall.
The same four steps work for any browser
This is the part worth keeping, because Opera is not special. Every browser distributed as a downloadable package for Debian-based systems behaves identically: it adds a repository, it adds a key, and it keeps your profile in a hidden folder in your home directory.
| Browser | Usual package name | Profile folder |
|---|---|---|
| Opera | opera-stable |
~/.config/opera |
| Google Chrome | google-chrome-stable |
~/.config/google-chrome |
| Brave | brave-browser |
~/.config/BraveSoftware |
| Vivaldi | vivaldi-stable |
~/.config/vivaldi |
Confirm the exact names on your own machine with dpkg -l | grep -i and the browser's name, rather than trusting a table — packaging changes, and the point of the check is that you never have to guess.
♂️ Jake's Reality Check
"Right, but be honest with me. If I'd just left the profile folder there and lent the laptop out, would anything actually have happened? Or is this one of those things that's technically true and never matters?"
Probably nothing would have happened, and that is the wrong way to think about it. The realistic outcome is a teenager who never opens a browser that is not installed. The realistic bad outcome is that somebody reinstalls Opera on the machine out of curiosity, and it finds the profile sitting exactly where it left it, still signed in to whatever it was signed in to. That is not an attack, it is just how the folder works. The cost of the extra step is one command and thirty seconds. The cost of skipping it is a small chance of a conversation you would really rather not have with a customer. That is an easy trade, and it is the same trade every time you hand a machine to anybody.
Questions people actually ask about this
How do I uninstall Opera from Kali Linux?
Open a terminal and run sudo apt purge opera-stable followed by sudo apt autoremove. That removes the program and its configuration, and cleans up anything installed alongside it that nothing else needs. If the package has a different name on your system, run dpkg -l to list what is installed and look for the opera entry, because the beta and developer builds use different package names.
What is the difference between apt remove and apt purge?
Remove deletes the program but keeps its system-wide configuration files, so reinstalling later picks up where you left off. Purge deletes the configuration as well. For a browser you are finished with, purge is the one you want. Neither of them touches anything in your home directory, which is why your Opera profile survives both and has to be deleted separately if you want it gone.
Why is dpkg -r not the best way to remove Opera?
It is not wrong, it is partial. dpkg works on one package at a time and knows nothing about the wider system, so it removes the program while leaving configuration files, any dependencies installed alongside it, and the repository the installer added. apt sits above dpkg and handles all of that. Use apt for removal and keep dpkg for inspecting what is installed.
Does uninstalling Opera delete my bookmarks and saved passwords?
No, and this is the part most guides miss entirely. Package tools never delete files from your home directory, by design, so your profile stays in the hidden .config and .cache folders under your home with its history, cookies, bookmarks and saved logins intact. If you are removing the browser for privacy reasons, or handing the machine on, deleting the package is not enough. Delete the profile folders as well.
Why does apt update still mention Opera after I removed it?
Because the Opera installer added its own software repository to your system, and removing the program does not remove the repository. Your machine keeps contacting Opera's servers on every update check, and if the key expires you start getting signature warnings for software you no longer have. The repository file lives in the apt sources directory and has to be deleted by hand.
How do I remove the Opera repository and signing key?
List the apt sources directory to find the Opera entry, then delete that file with sudo rm. Check both the trusted keys directory and the keyrings directory for an Opera key file and delete that too, since different versions of the package put it in different places. Then run sudo apt update once, and Opera should no longer appear in the list of sources being contacted.
What if the package is called opera-beta or opera-developer?
Then use that name instead. Opera ships three separate packages that can be installed at the same time, and removing one leaves the others running. List the installed packages and remove each Opera entry you find. The repository file and the signing key are usually shared between them, so leave those until the last package is gone, otherwise the remaining installations lose their updates.
How do I remove Opera if I installed it with Flatpak or Snap?
Then apt has never heard of it and nothing on this page applies. Flatpak installations come out with flatpak uninstall followed by the application id, and a flatpak uninstall --unused afterwards clears the runtimes left behind. Snap installations come out with sudo snap remove opera. If you are not sure which you used, run which opera and look at where the path points.
Opera keeps coming back after an update. Why?
Almost always because the repository is still configured and something is pulling the package back in, or because a second Opera package such as the beta build is still installed and was never removed. Remove every Opera package, then delete the repository file, then run an update. If it still returns, check whether a metapackage or an installation script you ran lists it as a dependency.
How do I check whether Opera is really gone?
Three checks, in order. Run dpkg -l and look for any remaining opera entry. Run which opera to see whether a program of that name is still on your path. Then list the apt sources directory to confirm no Opera repository file remains. If all three come back empty, the removal is complete, and the only thing that could still exist is the profile in your home directory.
Is it safe to run apt autoremove?
On a normal desktop system, yes, and it is the step that clears the libraries pulled in alongside the browser. Read the list before confirming, though. If autoremove proposes removing something that is clearly part of your desktop or a tool you use, stop and cancel, because that usually means a metapackage was removed earlier and apt now believes half your system is unwanted.
How do I set my default browser after removing Opera?
If Opera was your default, links may stop opening until you set another browser. The quickest route is xdg-settings set default-web-browser followed by the desktop file name, which on a standard Kali installation is the Firefox ESR one. You can also set it inside the browser you want to use, or through the default applications section of your desktop settings.
Does this work for Chrome, Brave and Vivaldi too?
Yes, and that is the useful part of learning it once. Every browser distributed as a downloadable package for Debian-based systems adds its own repository and signing key in the same way, so all of them leave the same three kinds of leftovers behind. Substitute the package name, then check the same sources directory, the same key locations and the same hidden profile folder in your home directory.
I get a dpkg error while removing Opera. What now?
Stop and repair the package system before removing anything else. The usual message asks you to run dpkg with the configure option to correct the problem, and that is exactly what to do, followed by apt with the fix-broken install option. Trying to force the removal past a half-configured package state is how a small problem becomes a broken installation.
Do I need to reboot after removing a browser?
No. Nothing a browser package installs runs as a system service, so there is nothing to restart. Close any Opera windows before you remove it, because removing a running program leaves the running copy in memory until you do, and log out and back in if the application menu still shows an entry that no longer launches anything.
What Jake actually ran
Four lines, start to finish, before the laptop went out of the door:
sudo apt autoremove
sudo rm /etc/apt/sources.list.d/opera-stable.list
rm -rf ~/.config/opera ~/.cache/opera
Then dpkg -l | grep -i opera to check, which came back empty, and sudo apt update, which no longer mentioned Opera at all.
"That's it? I spent longer worrying about it than doing it."
"That's most of Linux housekeeping. The commands are short. Knowing which four to run is the part nobody hands you."
And the shop email, for the record, had never been signed in on that browser. He checked, which is the correct amount of checking to do.
- What apt and dpkg actually are, and when to use which
The background to the one decision this whole post turns on. - Fixing the dpkg was interrupted error
For the day a removal or an update stops halfway through. - Changing the desktop environment on Kali
The other removal job with a lot of leftovers, and a much bigger one. - Kernel-level Tor isolation for any app with oniux
If the reason you were changing browsers was privacy, this does more than any browser can.
Revision note. Originally published 10 December 2019, updated in October 2024, and rewritten on 9 August 2026. One honest correction: the original recommended sudo dpkg -r opera-stable, which does remove the browser but leaves the configuration, the repository, the signing key and your profile behind — that was incomplete when we published it, not something that changed later, and this version fixes it. The rest is what a decade of these questions taught us to expect afterwards: the repository that keeps phoning home, the second Opera package nobody remembers installing, the menu entry that outlives the program, and the profile folder full of saved logins that no uninstall guide mentions. Also updated for how Kali works now, including the newer package-source format you will see sitting alongside the old one in the same folder. If your removal has left something behind that is not covered here, tell us through the contact page — leftovers vary by how the thing was installed, and we would rather add your case than have the next person guess.