Ubuntu Server - Unable to remove package

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












0















I'm unable to remove package.



[sudo] password for admin: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
webmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 173 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 143102 files and directories currently installed.)
Removing webmin (1.900) ...
dpkg: error processing package webmin (--remove):
cannot remove '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
Errors were encountered while processing:
webmin
E: Sub-process /usr/bin/dpkg returned an error code (1)


When I looked in to the permissions, I see the following:



ls: cannot access '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
total 16
drwxr-xr-x 2 root root 4096 Jan 29 21:50 .
drwxr-xr-x 111 root root 12288 Jan 29 20:54 ..
-????????? ? ? ? ? ? stop.cgi


How to fix this.










share|improve this question



















  • 1





    Please show the output of mount to allow more detailed answers.

    – Bodo
    Jan 30 at 16:53















0















I'm unable to remove package.



[sudo] password for admin: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
webmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 173 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 143102 files and directories currently installed.)
Removing webmin (1.900) ...
dpkg: error processing package webmin (--remove):
cannot remove '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
Errors were encountered while processing:
webmin
E: Sub-process /usr/bin/dpkg returned an error code (1)


When I looked in to the permissions, I see the following:



ls: cannot access '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
total 16
drwxr-xr-x 2 root root 4096 Jan 29 21:50 .
drwxr-xr-x 111 root root 12288 Jan 29 20:54 ..
-????????? ? ? ? ? ? stop.cgi


How to fix this.










share|improve this question



















  • 1





    Please show the output of mount to allow more detailed answers.

    – Bodo
    Jan 30 at 16:53













0












0








0








I'm unable to remove package.



[sudo] password for admin: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
webmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 173 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 143102 files and directories currently installed.)
Removing webmin (1.900) ...
dpkg: error processing package webmin (--remove):
cannot remove '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
Errors were encountered while processing:
webmin
E: Sub-process /usr/bin/dpkg returned an error code (1)


When I looked in to the permissions, I see the following:



ls: cannot access '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
total 16
drwxr-xr-x 2 root root 4096 Jan 29 21:50 .
drwxr-xr-x 111 root root 12288 Jan 29 20:54 ..
-????????? ? ? ? ? ? stop.cgi


How to fix this.










share|improve this question
















I'm unable to remove package.



[sudo] password for admin: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
webmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 173 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 143102 files and directories currently installed.)
Removing webmin (1.900) ...
dpkg: error processing package webmin (--remove):
cannot remove '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
Errors were encountered while processing:
webmin
E: Sub-process /usr/bin/dpkg returned an error code (1)


When I looked in to the permissions, I see the following:



ls: cannot access '/usr/share/webmin/qmailadmin/stop.cgi': Bad message
total 16
drwxr-xr-x 2 root root 4096 Jan 29 21:50 .
drwxr-xr-x 111 root root 12288 Jan 29 20:54 ..
-????????? ? ? ? ? ? stop.cgi


How to fix this.







ubuntu package-management webmin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 at 16:29









Jeff Schaller

41.7k1156133




41.7k1156133










asked Jan 30 at 16:28









MovMov

1




1







  • 1





    Please show the output of mount to allow more detailed answers.

    – Bodo
    Jan 30 at 16:53












  • 1





    Please show the output of mount to allow more detailed answers.

    – Bodo
    Jan 30 at 16:53







1




1





Please show the output of mount to allow more detailed answers.

– Bodo
Jan 30 at 16:53





Please show the output of mount to allow more detailed answers.

– Bodo
Jan 30 at 16:53










1 Answer
1






active

oldest

votes


















1














Try to umount the file system that contains the corrupt file and check it with fsck (or probably e2fsck, depending on your file system type).



If you cannot umount the file system because it's in use, you might have to boot a live system from CD/DVD/USB to do the fsck






share|improve this answer























  • I already did fsck. No luck so far.

    – Mov
    Jan 30 at 17:03






  • 1





    @Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

    – Bodo
    Jan 30 at 17:11











  • I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

    – Mov
    Jan 30 at 17:19






  • 1





    Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

    – Bodo
    Jan 30 at 17:45










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497733%2fubuntu-server-unable-to-remove-package%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Try to umount the file system that contains the corrupt file and check it with fsck (or probably e2fsck, depending on your file system type).



If you cannot umount the file system because it's in use, you might have to boot a live system from CD/DVD/USB to do the fsck






share|improve this answer























  • I already did fsck. No luck so far.

    – Mov
    Jan 30 at 17:03






  • 1





    @Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

    – Bodo
    Jan 30 at 17:11











  • I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

    – Mov
    Jan 30 at 17:19






  • 1





    Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

    – Bodo
    Jan 30 at 17:45















1














Try to umount the file system that contains the corrupt file and check it with fsck (or probably e2fsck, depending on your file system type).



If you cannot umount the file system because it's in use, you might have to boot a live system from CD/DVD/USB to do the fsck






share|improve this answer























  • I already did fsck. No luck so far.

    – Mov
    Jan 30 at 17:03






  • 1





    @Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

    – Bodo
    Jan 30 at 17:11











  • I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

    – Mov
    Jan 30 at 17:19






  • 1





    Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

    – Bodo
    Jan 30 at 17:45













1












1








1







Try to umount the file system that contains the corrupt file and check it with fsck (or probably e2fsck, depending on your file system type).



If you cannot umount the file system because it's in use, you might have to boot a live system from CD/DVD/USB to do the fsck






share|improve this answer













Try to umount the file system that contains the corrupt file and check it with fsck (or probably e2fsck, depending on your file system type).



If you cannot umount the file system because it's in use, you might have to boot a live system from CD/DVD/USB to do the fsck







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 30 at 16:49









BodoBodo

1,529212




1,529212












  • I already did fsck. No luck so far.

    – Mov
    Jan 30 at 17:03






  • 1





    @Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

    – Bodo
    Jan 30 at 17:11











  • I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

    – Mov
    Jan 30 at 17:19






  • 1





    Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

    – Bodo
    Jan 30 at 17:45

















  • I already did fsck. No luck so far.

    – Mov
    Jan 30 at 17:03






  • 1





    @Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

    – Bodo
    Jan 30 at 17:11











  • I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

    – Mov
    Jan 30 at 17:19






  • 1





    Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

    – Bodo
    Jan 30 at 17:45
















I already did fsck. No luck so far.

– Mov
Jan 30 at 17:03





I already did fsck. No luck so far.

– Mov
Jan 30 at 17:03




1




1





@Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

– Bodo
Jan 30 at 17:11





@Mov Did you unmount the file system for fsck? Maybe you have to force the check. Please show the fsck command and its output in your question. ...and the mount output as already suggested. If you unsuccessfully tried other things, add this information to your question.

– Bodo
Jan 30 at 17:11













I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

– Mov
Jan 30 at 17:19





I did force fsck at boot and rebooted the system. and no errors reported at that time. AFAIK, at the boot time, when you run fsck, filesystem is always in unmounted state. I assuming you are not referring to the single user run level after the boot. May be I need to nuke the filesystem?

– Mov
Jan 30 at 17:19




1




1





Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

– Bodo
Jan 30 at 17:45





Please add all important information to the question. This way it's easier for everyone to understand the problem. You could try to boot a live system and see if it shows the same problem for the affected file and if yes try to run fsck from there. If you only write what you did without showing the exact command and output it is not possible to check for errors or give hints for better commands.

– Bodo
Jan 30 at 17:45

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497733%2fubuntu-server-unable-to-remove-package%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay