How to fix N: Package 'package-name' is not installed, so not removed. Did you mean 'package-name2'? in APT
This notice appears when trying to remove a package that isn't installed, often due to package name typos or confusion between similar package names. APT helpfully suggests alternative package names, making it easy to find and remove the correct package or simply skip the operation.
Quick fix
Fixes N: Package 'package-name' is not installed, so not removed. Did you mean 'package-name2'?
apt list --installed | grep package-name- Verify if the package is actually installed
- Review the suggested alternative package names
- Search for the correct package name if unsure
- Use apt show to verify package details
apt list --installed | grep package-nameN: Package 'package-name' is not installed, so not removed. Did you mean 'package-name2'?
What this error means
This is a notice (not an error) that appears when you attempt to remove a package using `apt remove` or `apt-get remove` but the package name you specified is not actually installed on your system. Rather than failing silently, modern versions of APT provide a helpful suggestion of similarly-named packages that are installed, reducing confusion and helping you either correct the package name or confirm that you didn't need to remove anything. The "N:" prefix indicates this is a "Notice" level message—it won't prevent the operation from succeeding (if there are other packages to remove), but it does inform you that the specified package couldn't be found or was already uninstalled.
Typical symptoms
- When running apt remove or apt-get remove, a notice appears with 'is not installed, so not removed'
- APT suggests alternative package names with 'Did you mean' message
- You expected to remove a package but it appears it's either already removed or never installed
- The command continues successfully even though the specific package wasn't removed
Common causes
- Typo in the package name when specifying which package to remove
- Package was already uninstalled or never installed on the system
- Confusion between package name and application name (e.g., docker.io vs docker)
- Package name has changed between releases, so the old name no longer exists
- Attempting to remove a package from a different distribution or repository that is not available
How to fix "N: Package 'package-name' is not installed, so not removed. Did you mean 'package-name2'?"
First, check whether the package you're trying to remove is installed on your system:
apt list --installed | grep package-nameThis will show if a package matching that name is installed. If it returns nothing, the package is not installed and there's nothing to remove.
APT's suggestion in the error message indicates similarly-named packages that ARE installed. If one of the suggested names is what you intended to remove, use that name instead:
sudo apt remove suggested-package-nameFor example, if you tried to remove "docker" but APT suggests "docker.io", use:
sudo apt remove docker.ioIf you're not sure about the correct package name, search APT's package database:
apt search package-keywordReplace "package-keyword" with part of the package name you're looking for. This will show all packages matching that keyword, including their exact names and descriptions. Find the one you want to remove and note its exact name.
Once you've identified the likely package name, verify it with:
apt show package-nameThis shows details about the package including whether it's installed. If the output says "State: installed", then you have the right package name and can remove it. If it says "State: not/installed", the package is not currently on your system.
Once you've confirmed the correct package name, remove it:
sudo apt remove correct-package-nameAPT will show you what it plans to remove and ask for confirmation. Review the output carefully before typing 'y' to proceed.
If the notice indicates the package is already removed (not installed), you can simply ignore the message. The notice is just APT informing you that nothing was removed for that particular package name, but other packages in the command may still be processed.
If you were trying to remove only that one package, you're done—it's already off your system.
Advanced notes
Package Naming Conventions: Many packages use names different from the application they install. For example, the "Docker" container engine is installed via the docker.io package, Visual Studio Code comes from the code package, and Node.js often comes from the nodejs package rather than node. Understanding these naming conventions prevents confusion when managing packages.
Difference Between apt and apt-get: Modern Debian/Ubuntu systems provide both apt and apt-get commands. apt is the newer, more user-friendly interface that includes improvements like the "did you mean" suggestions. If you're using older systems with only apt-get, it may not provide these helpful suggestions.
Checking Installation Status: You can also check the dpkg database directly to see the exact status of a package:
dpkg -l | grep package-nameLook for "ii" in the first column to confirm installation, "rc" to indicate it's removed but configuration remains, or "un" for unknown/uninstalled status.
Multiple Packages: You can remove multiple packages in one command:
sudo apt remove package1 package2 package3If one package isn't installed, APT will show the notice for that one but successfully remove the others.
Frequently asked questions
- What does "N: Package 'package-name' is not installed, so not removed. Did you me" mean?
- This is a notice (not an error) that appears when you attempt to remove a package using apt remove or apt-get remove but the package name you specified is not actually installed on your system. Rather than failing silently, modern versions of APT provide a helpful suggestion of similarly-named packages that are installed, reducing confusion and helping you either correct the package name or confirm that you didn't need to remove anything. The "N:" prefix indicates this is a "Notice" level message—it won't prevent the operation from succeeding (if there are other packages to remove), but it does inform you that the specified package couldn't be found or was already uninstalled.
- How do I fix "N: Package 'package-name' is not installed, so not removed. Did you me"?
- This notice appears when trying to remove a package that isn't installed, often due to package name typos or confusion between similar package names. APT helpfully suggests alternative package names, making it easy to find and remove the correct package or simply skip the operation.
- What causes "N: Package 'package-name' is not installed, so not removed. Did you me"?
- Typo in the package name when specifying which package to remove Package was already uninstalled or never installed on the system Confusion between package name and application name (e.g., docker.io vs docker)
- Is the "N: Package 'package-name' is not installed, so not removed. Did you me" error serious?
- It is a low-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚APT Official Documentation
- 📖Debian Manual: apt command reference(Official Docs)
- 📖Ubuntu Community: apt-get howto guide(Official Docs)