Results 1 to 9 of 9

Thread: dpkg warnings and how to resolve?

  1. #1
    Join Date
    Sep 2017
    Beans
    19

    Cool dpkg warnings and how to resolve?

    When doing
    Code:
    $ sudo apt update $$ sudo apt upgrade -y
    I get the following dpkg warnings
    Code:
    dpkg: warning: unable to delete old directory '/var/lib/ubuntu-advantage': Directory not empty
    and
    Code:
    dpkg: warning: unable to delete old directory '/etc/ubuntu-advantage': Directory not empty
    . After googling about it I see instruction advising to
    Code:
    sudo rm -rf /var/lib/ubuntu-advantage/* && sudo rm -rf /etc/ubuntu-advantage/*
    in order to resolve the issue.

    Of course I would
    Code:
    sudo mv /var/lib/ubuntu-advantage /var/lib/ubuntu-advantage.backup && sudo mv /etc/ubuntu-advantage /etc/ubuntu-advantage.backup
    and then remove that later if no problems arose.

    But is
    Code:
    sudo rm -rf /var/lib/ubuntu-advantage/* && sudo rm -rf /etc/ubuntu-advantage/*
    a safe course of action? And is it the only thing that should be done or should I also
    Code:
    sudo apt-get install --reinstall ubuntu-advantage
    after that.

    Maybe I shouldn't
    Code:
    sudo rm -rf /var/lib/ubuntu-advantage/* && sudo rm -rf /etc/ubuntu-advantage/*
    at all bc it would break my system?

    And what about dpkg?

    If I did
    Code:
    sudo rm -rf /var/lib/ubuntu-advantage/* && sudo rm -rf /etc/ubuntu-advantage/*
    is there some follow up dpkg command I should issue to fix any broken or unresolved issues with it?
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    tldr; Basically I'm getting a dpkg warning about two directories that it can't remove because they have contents in them. I googled about it and found instruction telling me to manually force remove the directories but I'm not sure that is the safe or right thing to do. Also I'm not sure if I should reinstall the package associated with the directories (Ubuntu Advantage) in order to do a complete fix or if I should just not be removing those dirs at all. One final question is (if it is safe to remove the dirs and I do) is there some follow up command for dpkg or anything else that I should issue to resolve any conflicts or unresolved stuff?

    I realize that because its just a warning it isn't critical to the operation of my system but I like to keep things clean and tidy so I really just want to fix this.

    Thanks in advance for any help.
    Last edited by blahboybaz; March 16th, 2024 at 10:05 PM. Reason: Fixed a formatting issue to "improve readability"?

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: dpkg warnings and how to resolve?

    That warning really is of no consequence at all and you can totally ignore it.
    It is simply because a folder (directory) containing files can not be removed with a simple rm command when dealing wit package management.

  3. #3
    Join Date
    Sep 2017
    Beans
    19

    Re: dpkg warnings and how to resolve?

    Quote Originally Posted by ajgreeny View Post
    That warning really is of no consequence at all and you can totally ignore it.
    It is simply because a folder (directory) containing files can not be removed with a simple rm command when dealing wit package management.
    I understand that and I even mentioned that myself in my op. I *want* to fix it - but I want to make sure I don't mess anything up in doing so.
    Last edited by blahboybaz; March 16th, 2024 at 10:10 PM. Reason: Making my response more readable.

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: dpkg warnings and how to resolve?

    It really is just a silly thing, but that is the way the package manager works as a safety precaution to not over write an existing folder.

    But is it safe, I'm still up in the air about that personally.
    Code:
    sudo rm -rf /var/lib/ubuntu-advantage/* && sudo rm -rf /etc/ubuntu-advantage/*
    after that runs on mine:
    Code:
    ls  /var/lib/ubuntu-advantage
    apt-esm  status.json
    Now the important part:
    Code:
    ls  /etc/ubuntu-advantage
    ls: cannot access '/etc/ubuntu-advantage': No such file or directory
    This is the bad part:
    Code:
    sudo apt install ubuntu-advantage
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package ubuntu-advantage
    I believe this is what you meant:
    Code:
    apt policy ubuntu-advantage-tools
    ubuntu-advantage-tools:
      Installed: 31.1
      Candidate: 31.1
      Version table:
         31.2 100
            100 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
            100 http://archive.ubuntu.com/ubuntu noble-proposed/main i386 Packages
     *** 31.1 500
            500 http://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages
            500 http://us.archive.ubuntu.com/ubuntu noble/main i386 Packages
            100 /var/lib/dpkg/status
    Back-ups are your best friend..
    Code:
    sudo mv /etc/ubuntu-advantage.backup /etc/ubuntu-advantage
    Code:
    ls /etc/ubuntu-advantage
    uaclient.conf
    I get where your heart is, but is it really worth the effort?
    Last edited by 1fallen; March 16th, 2024 at 10:47 PM. Reason: Add to
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  5. #5
    Join Date
    Sep 2017
    Beans
    19

    Unhappy Re: dpkg warnings and how to resolve?

    Quote Originally Posted by 1fallen View Post
    It really is just a silly thing, but that is the way the package manager works as a safety precaution to not over write an existing folder.
    I get where your heart is, but is it really worth the effort?
    Yes. As evidenced by the fact that I've spent this much effort to get some guidance.

    Why do people argue with me about the validity of my desires? Don't we all have the right to care about whatever we care about? All I asked was for some guidance in resolving something I had already determined (for myself) was an issue worth addressing - not questioned about my reasoning or invalidated. If others wouldn't care about something like this then that's their prerogative.

    Quote Originally Posted by 1fallen View Post
    But is it safe, I'm still up in the air about that personally.
    Thank you - that's slightly useful even if if isn't conclusive.

    At the end of the day I'd still like to get help with this.
    Last edited by blahboybaz; March 17th, 2024 at 09:32 PM. Reason: Fixed a typo.

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: dpkg warnings and how to resolve?

    Quote Originally Posted by blahboybaz View Post
    Yes. As evidenced by the fact that I've spent this much effort to get some guidance.

    Why do people argue with me about the validity of my desires? Don't we all have the right to care about whatever we care about? All I asked was for some guidance in resolving something I had already determined (for myself) was an issue worth addressing - not questioned about my reasoning or invalidated. If others wouldn't care about something like this then that's their prerogative.
    No argument, as I said, it's just something personal....and I showed the outcome. And no one is stopping you from doing the same.

    Quote Originally Posted by blahboybaz View Post
    Thank you - that's slightly useful even if if isn't conclusive.

    At the end of the day I'd still like to get help with this.
    I'll never say it's safe for everyone....sorry if that's not conclusive enough.
    Code:
    aptitude why ubuntu-advantage-tools
    i   xubuntu-desktop     Depends update-manager                   
    i A update-manager      Depends update-manager-core (= 1:24.04.4)
    i A update-manager-core Depends ubuntu-advantage-tools (>= 30~)
    Regards
    Last edited by 1fallen; March 17th, 2024 at 11:46 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  7. #7
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: dpkg warnings and how to resolve?

    @blahboybaz ---

    Post #2 of ajgreeny was spot-on and should have been enough to accept. You took that further. 1fallen tried to explain and settle your fears.

    You seem to be a bit defensive and read much between the lines that are not there. If I read between the lines of your posts, you seem to be offensive and agressive towards those that are honestly and sincerely trying to help you.

    I am blatantly honest and call things as I see it. I truely hope that is not what you are consciously doing to the Members here. They are trying to help you. Accept their answers as that.

    If not, then this Support Section is not the place to cause troubles. I am a bit protective of the Members here.

    Going back to our question and Post #2's explanation... Stick arpund long enough and you will learn to just ignore that message type in the system updates. It is a harmless message that says it attempted to remove a directory, but because it was not empty, it left it there. No harm. No foul. No problem. Note that it did not throw an error on that at all. It was just an informative info type message. Not even a warning.

    Play nice please. Live well.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  8. #8
    Join Date
    Sep 2017
    Beans
    19

    Re: dpkg warnings and how to resolve?

    @1fallen

    I'm real sorry man. I didn't read your post thoroughly and I should have done that before responding. I really appreciate you taking the time to share the info with me and I apologize for that mistake. I hope you can forgive me. I will mark this as solved.

  9. #9
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: dpkg warnings and how to resolve?

    Nothing really to forgive, knowledge is always useful, and I'm slightly at fault in post #2 for saying it was a warning; it was not a warning at aĺl, as MAFoElffen said, but merely information.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •