LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2017, 12:36 PM   #16
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175

Quote:
Originally Posted by hydrurga View Post
That looks great, thanks Gregg.

Just a note for the future. Partly to avoid all these orphaned dependencies (dependencies that were installed because they are required by a package but which are no longer needed because that package has since been removed), I use sudo apt-get --purge autoremove package every time I want to remove a package that I no longer need.

What this command does is to (i) remove the package, (ii) remove the package's system configuration files (--purge), and (iii) remove any orphaned dependencies remaining on the system from whatever package.

This keeps things nice and clean. What you should note however is that it doesn't remove any user configuration files that may have been created in your home directory (possibly hidden with a . as the first letter of the filename). It is up to you to remove these manually if you want to (but you have to be fairly certain what you're doing - I tend to not worry about these as they will disappear when I do a fresh install every couple of years).

If you're still up for this mini-journey, there are some other things we can do, including purging all the package system configuration files that remain on your system, but first, to see what the current situation is, can you please paste the output from:

sudo apt-get update

sudo apt-get upgrade

I may seem a bit anal about this, but if you keep on top of updates, you can avoid a great deal of problems. You don't want to see any errors or warnings for sudo apt-get update, and here's what you want to see every time after sudo-apt upgrade (unless you have intentionally held back any packages i.e. told apt that you don't want them considered for updating, which you haven't):

Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
The above output is my nirvana. ;-)
Thanks hydrurga. Phew. All this stuff makes me a little nervous thinking about doing it on my own but I'm learning little by little. It seems to me a plan for the future might be what you said in an earlier post:

Quote:
You really need to keep on top of them with sudo apt-get update, sudo apt-get upgrade and sudo apt-get autoremove or problems will arise.
That I could do. But I'm a little leery of sudo apt-get --purge autoremove package because I don't know what you mean by a package. Like if I want to remove Shutter (screen capture tool). Is that considered removing a package?

Just a heads-up I'm going out of town for my nephew's wedding so I won't be around till Tuesday. (But I'll be here all today.) I just didn't want you to think I was apathetic about this. I'm not. It's great stuff. Thanks.

And I post the Pastebin and Hastebin with the same data. Do you prefer one over the other? From what I've read the Hastebin displays the code better (I guess with the highlighting).

IMHO the upgrade is MUCH less extensive than the last time. Last time it took a really long time. This time it was a relative flash.

Hastebin: https://hastebin.com/oyowubuzox.sql

Pastebin: http://pastebin.com/16NJb5Fu

Thanks!
 
Old 02-15-2017, 12:57 PM   #17
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
That's cool. We can take a break if you want.

Hastebin is all that I need - much easier to read (I like it!).

Generally, each program or application has an official package name, used by apt-get and the other package management tools. Usually this name is the same as or close to the program's common name.

If you want to see if you have shutter installed on your system and its official package name, then:

dpkg -l *shutter* should do the trick.

In this case, the package name is indeed shutter.

So, to completely remove that package, including its configuration files and any residual dependencies, you would type:

sudo apt-get --purge autoremove shutter

Job done.

What I would suggest is that you go over this thread and apply what you've learned to your other computer so that we can get that into a clean state too.

Last edited by hydrurga; 02-15-2017 at 01:04 PM.
 
1 members found this post helpful.
Old 02-15-2017, 07:47 PM   #18
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by hydrurga View Post
That's cool. We can take a break if you want.

Hastebin is all that I need - much easier to read (I like it!).

Generally, each program or application has an official package name, used by apt-get and the other package management tools. Usually this name is the same as or close to the program's common name.

If you want to see if you have shutter installed on your system and its official package name, then:

dpkg -l *shutter* should do the trick.

In this case, the package name is indeed shutter.

So, to completely remove that package, including its configuration files and any residual dependencies, you would type:

sudo apt-get --purge autoremove shutter

Job done.

What I would suggest is that you go over this thread and apply what you've learned to your other computer so that we can get that into a clean state too.
Cool. Thanks. Okay, I'm thinking about what to do to the other computer. (I won't do it till Tuesday though as I'll be gone.) Would that be these commands:

1)sudo apt-get update

2) sudo apt-get upgrade

3)sudo apt-get autoremove

And for this computer you had me run #1 and #2 and then report the results first before running #3. So would it be the same process with the other computer or just run all three consecutively?
 
Old 02-15-2017, 08:11 PM   #19
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
Quote:
Originally Posted by Gregg Bell View Post
Cool. Thanks. Okay, I'm thinking about what to do to the other computer. (I won't do it till Tuesday though as I'll be gone.) Would that be these commands:

1)sudo apt-get update

2) sudo apt-get upgrade

3)sudo apt-get autoremove

And for this computer you had me run #1 and #2 and then report the results first before running #3. So would it be the same process with the other computer or just run all three consecutively?
Consecutively, except if you encounter errors, in which case stop there and report back.

Enjoy the wedding!
 
1 members found this post helpful.
Old 02-21-2017, 10:15 PM   #20
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by hydrurga View Post
Consecutively, except if you encounter errors, in which case stop there and report back.

Enjoy the wedding!
Thanks, hydrurga, the wedding was fun (and in sunny Ft. Lauderdale). Now it's back to the grind.

Okay, I ran the first command and only saw a lame-looking 'warning' so I ran the next command, which ran way less than when I ran it on the other computer so I'm assuming this computer is much less screwed up. I was going to run the 'remove' command but then I looked back at an old post and you said to reboot the computer because there were kernel changes and I don't know if that is the case with this computer (I know there's a lot of unnecessary kernels on this one, though) but to be on the safe side I'm going to reboot before I run it.

Here's the results from the first two commands.

https://hastebin.com/foxibiwoqo.sql

Back soon.
 
Old 02-21-2017, 10:41 PM   #21
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Okay, it removed a lot of kernels. It seemed to me all good. The terminal results didn't go all the way back to the start, though.

And before I re-started the computer there was a large software update, which I ran. And then I re-booted and now that it's back up it's telling me to re-boot again, which I shall do forthwith.

Here's the 'remove' results:https://hastebin.com/duhizeweku.sql

Thanks.

Back soon.
 
Old 02-21-2017, 10:45 PM   #22
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Okay, latest re-boot done. Everything looks good to me!
 
Old 02-22-2017, 04:17 AM   #23
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
Excellent. Glad you enjoyed it, Gregg, and glad the computer cleaning went well.

There are some other actions that we could take regarding the removal of "orphaned" configs, but to be honest with you they're not of such importance and as your systems are both running well I think we should leave it there.

To keep on top of things from now on, all you need to do is a regular:

sudo apt-get update

sudo apt-get upgrade


and if/when you want to remove a package at any point:

sudo apt-get --purge autoremove package, substituting the real package name for the word "package".

That's it. Have fun!
 
1 members found this post helpful.
Old 02-22-2017, 12:45 PM   #24
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by hydrurga View Post
Excellent. Glad you enjoyed it, Gregg, and glad the computer cleaning went well.

There are some other actions that we could take regarding the removal of "orphaned" configs, but to be honest with you they're not of such importance and as your systems are both running well I think we should leave it there.

To keep on top of things from now on, all you need to do is a regular:

sudo apt-get update

sudo apt-get upgrade


and if/when you want to remove a package at any point:

sudo apt-get --purge autoremove package, substituting the real package name for the word "package".

That's it. Have fun!
Great! Thanks hydrurga! Yeah, this gives me a good way to go for the future. I have a question though. When I do the

sudo apt-get update and

sudo apt-get upgrade

commands and should I have some things that need to be removed, do I re-boot and then run that sudo apt-get autoremove command?
 
Old 02-24-2017, 07:37 AM   #25
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
Sorry for not getting back to you sooner on this, Gregg.

I should clarify. The commands

sudo apt-get update

sudo apt-get upgrade

are separate from the command

sudo apt-get --purge autoremove package

You should run the former two on a fairly regular basis in order to keep your system up-to-date as well as to highlight any potential package management related problems early.

The latter should be run when you want to remove a package.

The only time you should need to reboot is when the kernel was updated during the apt-get upgrade or, for some other fundamental system packages, when the output from the apt-get upgrade command recommends that you do so.
 
1 members found this post helpful.
Old 02-24-2017, 03:37 PM   #26
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by hydrurga View Post
Sorry for not getting back to you sooner on this, Gregg.

I should clarify. The commands

sudo apt-get update

sudo apt-get upgrade

are separate from the command

sudo apt-get --purge autoremove package

You should run the former two on a fairly regular basis in order to keep your system up-to-date as well as to highlight any potential package management related problems early.

The latter should be run when you want to remove a package.

The only time you should need to reboot is when the kernel was updated during the apt-get upgrade or, for some other fundamental system packages, when the output from the apt-get upgrade command recommends that you do so.
Thanks hydrurga. I get what you're saying. The thing is I was wondering about if there are all kinds of things to be removed after I run the sudo apt-get upgrade command. (Like in that first computer's cleansing.)Then I ran the sudo apt-get autoremove command, not the sudo apt-get --purge autoremove package command. (screenshot)

And can you give me a ballpark estimate of what a 'fairly regular basis' might be? I'm not that computer intensive but I do tend to use them every day.
Attached Thumbnails
Click image for larger version

Name:	Selection_108.png
Views:	4
Size:	56.7 KB
ID:	24323  
 
Old 02-24-2017, 04:18 PM   #27
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
Once a week sounds reasonable for the update/upgrade. It should take virtually no time at all.

autoremove is a strange option for apt-get in that it removes all orphaned dependencies, whether you use it by itself or whether you use it in a command removing a specific package. When we initially used it, we weren't removing any packages, so we just used the general sudo apt-get autoremove to remove all the orphaned dependencies that had built up to-date.

However, from now on, you can use it as part as sudo apt-get --purge autoremove package every time that you remove a package, That means effectively that you are keeping on top of the orphaned dependencies each single time you remove a package - they're not getting a chance to build up at all. Orphaned dependencies only get created when a package is removed or purged and one or more packages which were installed along with it as dependencies are left installed with no other packages needing them. So, if you do that, you should never have to run the generic sudo apt-get autoremove again.

There's no need to remove anything after sudo apt-get upgrade. The only reason that we carried out the autoremove after we had carried out the initial upgrade was because a number of orphaned dependencies had built up over time. It was a separate issue to the upgrade.

Does that make sense?

Last edited by hydrurga; 02-24-2017 at 04:21 PM.
 
1 members found this post helpful.
Old 02-24-2017, 04:56 PM   #28
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 1,948

Original Poster
Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by hydrurga View Post
Once a week sounds reasonable for the update/upgrade. It should take virtually no time at all.

autoremove is a strange option for apt-get in that it removes all orphaned dependencies, whether you use it by itself or whether you use it in a command removing a specific package. When we initially used it, we weren't removing any packages, so we just used the general sudo apt-get autoremove to remove all the orphaned dependencies that had built up to-date.

However, from now on, you can use it as part as sudo apt-get --purge autoremove package every time that you remove a package, That means effectively that you are keeping on top of the orphaned dependencies each single time you remove a package - they're not getting a chance to build up at all. Orphaned dependencies only get created when a package is removed or purged and one or more packages which were installed along with it as dependencies are left installed with no other packages needing them. So, if you do that, you should never have to run the generic sudo apt-get autoremove again.

There's no need to remove anything after sudo apt-get upgrade. The only reason that we carried out the autoremove after we had carried out the initial upgrade was because a number of orphaned dependencies had built up over time. It was a separate issue to the upgrade.

Does that make sense?
It makes perfect sense, hydrurga. Thanks so much for all the AWESOME help. I think I better call this one solved to free you up to help somebody else. Thanks again!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ttf-mscorefonts-installer error Fixit7 Ubuntu 7 01-12-2017 03:41 PM
install ttf-mscorefonts Pedroski Linux - Software 3 10-16-2014 03:49 AM
new ttf fonts not available in LibreOffice (xubuntu 11.10) harryg123 Linux - Newbie 2 04-14-2012 10:37 AM
Configuring ttf-mscorefonts-installer khalidswimmer Linux - Newbie 1 08-23-2011 04:44 AM
ttf-mscorefonts-installer screwed up my wine environment taylorkh Ubuntu 3 01-26-2011 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration