0

Okay, I installed a 64MB sized program. Now I'm trying to uninstall it using Terminal:

sudo apt-get purge <program-name>

after running that command, the confirmation message will be:

blah blah blah...
The following packages will be REMOVED:
  <program-name>*

After this operation, 3,577 kB disk space will be freed.
Do you want to continue? [Y/n] 

Now my question is what the hell is happening here?!

64MB on installation, then 3.5MB after uninstalling???!

user68186
  • 33,360
  • 2
    Was the program 64MB in size or was the total space used 64MB (including dependencies)? Do apt-cache show <package-name> | grep -i size. – muru Aug 22 '14 at 14:15
  • Use sudo apt-get autoremove to remove orphaned packages which were installed as dependency with your program and no longer needed. – g_p Aug 22 '14 at 14:21

3 Answers3

0

A package can depend on other packages. These are all installed when you install the main package.sudo apt-get remove ... does not automatically free the now-orphaned dependencies that were installed for your package.

A simple sudo apt-get autoremove should free up the remaining space.

Oli
  • 293,335
0

Ubuntu does not work like Windows

In Windows, a program comes with pretty much all the files it needs.

In Ubuntu, a program uses a lot of common files. These are called dependencies. These common files are downloaded once and used by all the programs that need them. (This is one of the reason why Ubuntu does not install all the files in a single folder. It keeps different types of files in a common folder for that type of files so other programs can find them there.)

You may have installed some other programs that depend on some of these common files the first program installed as a part of the 64MB download.

When you remove the program, it looks at which other program will continue to need these common files and keeps them in place.

Sometimes this does not work too well, and some orphaned common files are left behind. You can use

sudo apt-get autoremove

to remove those files.

hope this helps

user68186
  • 33,360
0

Probably you uninstalled only main program, not other programs which were installed together with your main one, because he is using them.

You need to use apt-get together with autoremove command but... Be extra careful!

A few weeks ago, I wanted to uninstall Python2.7 (I had newer version). I did sudo apt-get autoremove python2.7. Didn't know what exactly I'm doing, so wrote "yes". And saw, that something is wrong, when i get information "removing terminal". I removed half of my Ubuntu system, had to reinstall it.

So, be extra careful with autoremove command. I think, just don't use it, unless you really need more free space or you really know what are you doing. You will not lose too much by not using autoremove, just a little disk space, Ubuntu will not be slower. I will not use it anymore unless I will be sure I know what I'm doing.

Hiperon43
  • 320