“Unable to locate package” error during apt-get uninstall

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I'm trying to clean out old CUDA installations by running



sudo apt-get purge nvidia-*


but I get the errors



E: Unable to locate package nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb
E: Couldn't find any package by glob 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'
E: Couldn't find any package by regex 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'


I had deleted the deb file previously after finishing the install. I tried re-downloading the .deb file and running dpkg -i on it, but that doesn't fix the error either.



dpkg -l | grep nvidia gives



ii nvidia-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary driver - version 390.48
ii nvidia-390-dev 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary Xorg driver development files
rc nvidia-diag-driver-local-repo-ubuntu1604-390.46 1.0-1 amd64 nvidia-diag-driver-local repository configuration files
ii nvidia-modprobe 390.46-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 396.18-0ubuntu0~gpu16.04.1 amd64 Tool for configuring the NVIDIA graphics driver






share|improve this question






















  • I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
    – steeldriver
    Apr 18 at 23:23










  • thanks for answering - I edited the question to show the printout.
    – Jesse Chan
    Apr 19 at 0:25















up vote
1
down vote

favorite












I'm trying to clean out old CUDA installations by running



sudo apt-get purge nvidia-*


but I get the errors



E: Unable to locate package nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb
E: Couldn't find any package by glob 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'
E: Couldn't find any package by regex 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'


I had deleted the deb file previously after finishing the install. I tried re-downloading the .deb file and running dpkg -i on it, but that doesn't fix the error either.



dpkg -l | grep nvidia gives



ii nvidia-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary driver - version 390.48
ii nvidia-390-dev 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary Xorg driver development files
rc nvidia-diag-driver-local-repo-ubuntu1604-390.46 1.0-1 amd64 nvidia-diag-driver-local repository configuration files
ii nvidia-modprobe 390.46-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 396.18-0ubuntu0~gpu16.04.1 amd64 Tool for configuring the NVIDIA graphics driver






share|improve this question






















  • I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
    – steeldriver
    Apr 18 at 23:23










  • thanks for answering - I edited the question to show the printout.
    – Jesse Chan
    Apr 19 at 0:25













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm trying to clean out old CUDA installations by running



sudo apt-get purge nvidia-*


but I get the errors



E: Unable to locate package nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb
E: Couldn't find any package by glob 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'
E: Couldn't find any package by regex 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'


I had deleted the deb file previously after finishing the install. I tried re-downloading the .deb file and running dpkg -i on it, but that doesn't fix the error either.



dpkg -l | grep nvidia gives



ii nvidia-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary driver - version 390.48
ii nvidia-390-dev 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary Xorg driver development files
rc nvidia-diag-driver-local-repo-ubuntu1604-390.46 1.0-1 amd64 nvidia-diag-driver-local repository configuration files
ii nvidia-modprobe 390.46-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 396.18-0ubuntu0~gpu16.04.1 amd64 Tool for configuring the NVIDIA graphics driver






share|improve this question














I'm trying to clean out old CUDA installations by running



sudo apt-get purge nvidia-*


but I get the errors



E: Unable to locate package nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb
E: Couldn't find any package by glob 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'
E: Couldn't find any package by regex 'nvidia-diag-driver-local-repo-ubuntu1604-390.46_1.0-1_amd64.deb'


I had deleted the deb file previously after finishing the install. I tried re-downloading the .deb file and running dpkg -i on it, but that doesn't fix the error either.



dpkg -l | grep nvidia gives



ii nvidia-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary driver - version 390.48
ii nvidia-390-dev 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA binary Xorg driver development files
rc nvidia-diag-driver-local-repo-ubuntu1604-390.46 1.0-1 amd64 nvidia-diag-driver-local repository configuration files
ii nvidia-modprobe 390.46-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-390 390.48-0ubuntu0~gpu16.04.3 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 396.18-0ubuntu0~gpu16.04.1 amd64 Tool for configuring the NVIDIA graphics driver








share|improve this question













share|improve this question




share|improve this question








edited Apr 19 at 0:27

























asked Apr 18 at 22:53









Jesse Chan

1087




1087











  • I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
    – steeldriver
    Apr 18 at 23:23










  • thanks for answering - I edited the question to show the printout.
    – Jesse Chan
    Apr 19 at 0:25

















  • I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
    – steeldriver
    Apr 18 at 23:23










  • thanks for answering - I edited the question to show the printout.
    – Jesse Chan
    Apr 19 at 0:25
















I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
– steeldriver
Apr 18 at 23:23




I don't think absence of the original .deb files should prevent package removal - however presence of files that match the nvidia-* shell glob in your current directory may well confuse things (you want apt to expand the * - not the shell). What does dpkg -l | grep nvidia actually say?
– steeldriver
Apr 18 at 23:23












thanks for answering - I edited the question to show the printout.
– Jesse Chan
Apr 19 at 0:25





thanks for answering - I edited the question to show the printout.
– Jesse Chan
Apr 19 at 0:25











1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










You are globbing current files in the directory. Instead of what you are running, try:



sudo apt-get purge nvidia-*
# or...
sudo apt-get purge 'nvidia-*'


The main clue that tells me this is the case: You tried to remove packages named like blah.deb in the apt-get purge output. Of course packages aren't normally named that way...



To see what I mean, check ls -l in your current directory. You should see the .deb files you are matching. If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.



Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.






share|improve this answer




















  • like a charm! thanks dpb!
    – Jesse Chan
    Apr 19 at 18:56










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026230%2funable-to-locate-package-error-during-apt-get-uninstall%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










You are globbing current files in the directory. Instead of what you are running, try:



sudo apt-get purge nvidia-*
# or...
sudo apt-get purge 'nvidia-*'


The main clue that tells me this is the case: You tried to remove packages named like blah.deb in the apt-get purge output. Of course packages aren't normally named that way...



To see what I mean, check ls -l in your current directory. You should see the .deb files you are matching. If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.



Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.






share|improve this answer




















  • like a charm! thanks dpb!
    – Jesse Chan
    Apr 19 at 18:56














up vote
2
down vote



accepted










You are globbing current files in the directory. Instead of what you are running, try:



sudo apt-get purge nvidia-*
# or...
sudo apt-get purge 'nvidia-*'


The main clue that tells me this is the case: You tried to remove packages named like blah.deb in the apt-get purge output. Of course packages aren't normally named that way...



To see what I mean, check ls -l in your current directory. You should see the .deb files you are matching. If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.



Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.






share|improve this answer




















  • like a charm! thanks dpb!
    – Jesse Chan
    Apr 19 at 18:56












up vote
2
down vote



accepted







up vote
2
down vote



accepted






You are globbing current files in the directory. Instead of what you are running, try:



sudo apt-get purge nvidia-*
# or...
sudo apt-get purge 'nvidia-*'


The main clue that tells me this is the case: You tried to remove packages named like blah.deb in the apt-get purge output. Of course packages aren't normally named that way...



To see what I mean, check ls -l in your current directory. You should see the .deb files you are matching. If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.



Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.






share|improve this answer












You are globbing current files in the directory. Instead of what you are running, try:



sudo apt-get purge nvidia-*
# or...
sudo apt-get purge 'nvidia-*'


The main clue that tells me this is the case: You tried to remove packages named like blah.deb in the apt-get purge output. Of course packages aren't normally named that way...



To see what I mean, check ls -l in your current directory. You should see the .deb files you are matching. If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.



Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 19 at 1:53









dpb

4,90911545




4,90911545











  • like a charm! thanks dpb!
    – Jesse Chan
    Apr 19 at 18:56
















  • like a charm! thanks dpb!
    – Jesse Chan
    Apr 19 at 18:56















like a charm! thanks dpb!
– Jesse Chan
Apr 19 at 18:56




like a charm! thanks dpb!
– Jesse Chan
Apr 19 at 18:56

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026230%2funable-to-locate-package-error-during-apt-get-uninstall%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491