franglais125 / apt-update-indicator

Apt Update Indicator
https://extensions.gnome.org/extension/1139/apt-update-indicator/
GNU General Public License v3.0
44 stars 17 forks source link

Question #30

Open yuriw opened 4 years ago

yuriw commented 4 years ago

First of all - great extension !

Question 1 - I see Residual Config Files. How can then be cleaned?

Question 2 I usually use sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get autoclean && sudo apt-get -y autoremove Can this extension be set up to do this ?

Thx

franglais125 commented 4 years ago

Question 1 - I see Residual Config Files. How can then be cleaned?

You will have to apt purge pkgname each one of them, even if they are uninstalled. apt will then delete residuals. You can do it like this:

dpkg -l | grep '^rc'| awk '{print $2}' | xargs sudo apt purge

Myself, I usually simply purge packages, I don't remove them.

Question 2 I usually use sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get autoclean && sudo apt-get -y autoremove Can this extension be set up to do this ?

Sure thing. Perhaps what I can recommend is that you save this as a script somewhere, and then you simply point the extension to the script. That's what I used to do.

(I am not on Gnome 3.36, I need to port the extension, and I've been short in time.)

yuriw commented 4 years ago

@franglais125

clear on #1 thx! ( although it'd be nice to have a way to do it via the app )

on #2 - How do I "point the extension to the script" ? Example would be useful.

franglais125 commented 4 years ago
  1. Agreed, it would be nice. Perhaps some time in the future I can work on a "Clean packages" button.

  2. Script, as you proposed

    • Put your script in, say my_apt_script.sh:
      #!/bin/bash
      pkexec apt-get -y update && pkexec apt-get -y upgrade && pkexec apt-get autoclean && pkexec apt-get -y autoremove
sudo cp my_apt_script.sh /usr/bin/
sudo chmod 755 /usr/bin/my_apt_script.sh
yuriw commented 4 years ago

@franglais125 thx for details, I wanted to improve my packages' knowledge, and this is the step to the right direction :) (will try and it will keep me busy)

Nore: I see dangerous note and hmm...

On pkexec I never used it. Bu I have sudo enabled not to ask for password, will it work ?

PHLAK commented 4 years ago

I'd recommend using /usr/local/bin for non-system binaries.

See: https://unix.stackexchange.com/a/8658 and https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

franglais125 commented 4 years ago

I'd recommend using /usr/local/bin for non-system binaries.

Good point!

yuriw commented 4 years ago

@franglais125 @PHLAK cool thx ! I got all setup, so itching to see new updates available to test :)

yuriw commented 4 years ago

@franglais125 Worked great ! Thx

My task bar icon become red now, is it expected?

franglais125 commented 4 years ago

Can you send me a screenshot of that?

yuriw commented 4 years ago

image

@franglais125

It was not like that before

franglais125 commented 4 years ago

It looks to me like a broken icon...

yuriw commented 4 years ago

@franglais125 and the icon is back to normal today ! FYI