âUnable to locate packageâ error during apt-get uninstall
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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
nvidia package-management dpkg cuda
add a comment |Â
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
nvidia package-management dpkg cuda
I don't think absence of the original .deb files should prevent package removal - however presence of files that match thenvidia-*
shell glob in your current directory may well confuse things (you wantapt
to expand the*
- not the shell). What doesdpkg -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
add a comment |Â
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
nvidia package-management dpkg cuda
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
nvidia package-management dpkg cuda
edited Apr 19 at 0:27
asked Apr 18 at 22:53
![](https://i.stack.imgur.com/7BiDr.jpg?s=32&g=1)
![](https://i.stack.imgur.com/7BiDr.jpg?s=32&g=1)
Jesse Chan
1087
1087
I don't think absence of the original .deb files should prevent package removal - however presence of files that match thenvidia-*
shell glob in your current directory may well confuse things (you wantapt
to expand the*
- not the shell). What doesdpkg -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
add a comment |Â
I don't think absence of the original .deb files should prevent package removal - however presence of files that match thenvidia-*
shell glob in your current directory may well confuse things (you wantapt
to expand the*
- not the shell). What doesdpkg -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
add a comment |Â
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.
like a charm! thanks dpb!
â Jesse Chan
Apr 19 at 18:56
add a comment |Â
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.
like a charm! thanks dpb!
â Jesse Chan
Apr 19 at 18:56
add a comment |Â
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.
like a charm! thanks dpb!
â Jesse Chan
Apr 19 at 18:56
add a comment |Â
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.
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.
answered Apr 19 at 1:53
dpb
4,90911545
4,90911545
like a charm! thanks dpb!
â Jesse Chan
Apr 19 at 18:56
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 wantapt
to expand the*
- not the shell). What doesdpkg -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