How to remove wine and all newly added files

U

URDRWHO

Guest
Today I installed WINE because I was hoping that my Contact Manager Timer Matters 5.0 would work with it. It would not work. So I un-installed WINE. When I installed WINE it added about 450 megs of files and when I removed WINE it removed about 215 megs. That leaves a lot of files still installed.

How do I un-install all those newly installed files? I installed and un-installed through the repository.

Tried a few things I found on line --

cd $HOME
rm -rf .wine
rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.{xpm,png}
rm -f $HOME/.local/share/icons/*-x-wine-*.{xpm,png}
rm -f $HOME/.local/share/icons/????_*.{xpm,png}
rm -f $HOME/.local/share/icons/*-x-wine-*.{xpm,png}


This sudo dpkg --get-selections |grep wine
returns this
libkwineffects1abi3 install

I did

sudo apt-get clean
 


Do you have Synaptic? I would Mark (Wine) for Complete Removal i.e. it will remove the configuration files, as well as the app itself.

I would also look at the Orphaned Files. Does it appear under the Custom Filters Button? Mark all the Orphaned Files for Complete Removal.
For short, obsolete packages are not in any repository on your list anymore. Orphaned packages are automatic dependencies whose "dependants" have all been uninstalled. And apt-get autoremoveonly considers orphaned packages that were installed by apt to resolve dependencies.
https://askubuntu.com/questions/286947/obsolete-packages-vs-orphaned-packages

As the Quote hints the command to use is: sudo apt-get autoremove

You might also see something useful in https://sites.google.com/site/easylinuxtipsproject/clean
 
When it comes to removing packages using apt-get, if you want to completely remove the package and all of its configs, you should use apt-get purge:
Code:
sudo apt-get purge package1 package2 etc

In order to remove configs for packages that you've already uninstalled using apt-get remove, you could use dpkg, I think something like this will work:
Code:
sudo dpkg --purge $(dpkg -l | grep  '^rc' | awk '{print $2}')
dpkg -l - will list detailed information about all packages in your cache.
The output from dpkg is piped to the grep command, which filters the output to contain removed packages which have configs left over (These lines of output start with the status of each package, which is 'rc' for removed packages that still have configs). This output is then piped to awk, which filters out the names of the uninstalled packages. Yielding a list of uninstalled packages, which still have config files left over.
The generated list of packages is used as a parameter to the call to dpkg --purge, which will ensure that the packages and the configs are removed!

EDIT: Just tested it on my machine, seems to work well!
 
I have Muon.

Do you have Synaptic? I would Mark (Wine) for Complete Removal i.e. it will remove the configuration files, as well as the app itself.

I would also look at the Orphaned Files. Does it appear under the Custom Filters Button? Mark all the Orphaned Files for Complete Removal. https://askubuntu.com/questions/286947/obsolete-packages-vs-orphaned-packages

As the Quote hints the command to use is: sudo apt-get autoremove

You might also see something useful in https://sites.google.com/site/easylinuxtipsproject/clean
 
Do I put wine in anyplace on those scripts?


When it comes to removing packages using apt-get, if you want to completely remove the package and all of its configs, you should use apt-get purge:
Code:
sudo apt-get purge package1 package2 etc

In order to remove configs for packages that you've already uninstalled using apt-get remove, you could use dpkg, I think something like this will work:
Code:
sudo dpkg --purge $(dpkg -l | grep  '^rc' | awk '{print $2}')
dpkg -l - will list detailed information about all packages in your cache.
The output from dpkg is piped to the grep command, which filters the output to contain removed packages which have configs left over (These lines of output start with the status of each package, which is 'rc' for removed packages that still have configs). This output is then piped to awk, which filters out the names of the uninstalled packages. Yielding a list of uninstalled packages, which still have config files left over.
The generated list of packages is used as a parameter to the call to dpkg --purge, which will ensure that the packages and the configs are removed!

EDIT: Just tested it on my machine, seems to work well!
 
Sorry, yes.... In the first command I posted:
Code:
sudo apt-get purge package1 package2 etc

It was an incomplete example. I forgot to mention that
"package1 package2 etc" represented the list of packages to purge.
So to purge wine and all of its configs, you'd use:
Code:
sudo apt-get purge wine

But if you've already removed wine with apt-get remove, I don't think purge will work because although there are leftover configs on your system, the package is no longer installed. In which case you should use the dpkg command I provided, which will remove configs for any other removed packages.

Also, I forgot to mention that after purging a package with apt-get purge, you can also purge any orphaned/unused packages that the removed package depended on by using apt-get autoremove with the --purge option:
Code:
sudo apt-get autoremove --purge
 

Members online


Top