Remove individual Wine packages Ubuntu 15.04 - linux

I use Ubuntu 15.04.
I wanted to install PSpice, but I needed a program that would run .exe; I found out about Wine, and so tried to install it like this:
sudo apt-get install wine
Everything was working fine, I watched it download and install a TON of packages. However, a screen popped up asking for agreement to Eula software terms. There was no way to accept, so I had to end the process by closing the terminal with the "x" button (which locked up dpkg).
I removed the lock file from /var/lib/apt/lists and /var/cache/apt/archives, and killed the process that had locked dpkg (am I phrasing that correctly?).
So now, the ship is running smoothly, but I want to remove all of the packages that are associated with Wine.
I tried:
sudo apt-get --purge remove wine
I got a message saying "wine not installed".
There must be some way to identify all the packages in /var/cache/apt/archives that are directly associated with Wine, and subsequently remove them.
I'm relatively new to this, please be EXTRA thorough in your help.

First, your system runs fine, wine doesn't exist on it any more, so there isn't too many to do. What I understand you actually want an afterparty cleanup after your wine try.
Wine hasn't too many dependent packages and they don't harm too many. In similar cases, if there is a large software system from a lot of packages, there is a common package on which all of them depends. For example, in case of X it is x11-common, removing it with apt-get --purge remove cleans up your whole system from the X entirely. You can find this by calling some dpkg -s on some packages recursively, and see where is this "common denominator".
But in the case of wine it isn't the case, wine depends only on some libs. Your system now works, maybe the recursive removal of ~/.wine would be useful (here are all of your wine settings, even your virtual C:).
apt-get --purge autoremove removes all of your packages which were installed as a dependency (thus, not directly by apt-get install), and whose original package doesn't exist any more.
deporphan is also a useful tool, it finds packages who aren't dependency of anything and seem seamlessly uninstallable.
dpkg -l|grep wine shows every package whose name or short description contains the wine string, maybe some wine-common or similar package does exist yet.

sudo apt-get remove --autoremove wine-stable wine-stable-amd64
use this command to remove wine completely

Related

What are the differences between apt clean/remove/purge etc. commands?

I am quite new to Linux and Apt package manager. I try to build my first docker image (write my first Dockerfile) based on other Dockerfiles written by co-workers for other projects. I came across these commands and however I tried to google them separately one-by-one, as a Linux newbie I still don't really understand what are the differences between them or which one should I use or should I use them all together?
This is a piece from the Dockerfile:
RUN rm -rf /var/lib/apt/lists/*; \
apt-get purge -y --auto-remove; \
apt-get autoremove; \
apt-get clean;
Could you please explain briefly what is the difference?
The differences between the command you metioned are described as follows. Hope these can help you a little.
apt remove
remove is identical to install except that packages are removed instead of installed.
It will remove the binaries, but leave configuration files, data files, and dependencies installed with it on installation time untouched.
apt purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
It will remove about everything regarding the package, but not the dependencies installed with it on installation, which is particularly useful when you want to “start all over” with an application because you messed up the configuration.
However, purge won’t touch configuration or data files inside the user’s home folder (e.g. /home/User/hiddenFolders). There is no easy way to get those removed as well.
Note that other tools like aptitude will only remember dependency information for packages that it has installed.
apt autoremove
autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
In other words, it will only goes through the catalog and remove any left over packages that were not directly installed and that are not required by packages that are installed. Say that you install apache, it will install a lot of libraries. If you remove apache, all these libraries will be left behind until you run autoremove.
The only thing you should watch for, is if you started using one of the dependencies say “Python” but never actually installed it yourself; then it will be removed.
apt clean
clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archieves/partial/.
apt autoclean
Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it going out of control.
Extra
This part of contents is not closely related to the question, but I think it's necessary to give you some extra suggestions.
Do not remove files belonging to packages without using the package manager! It will get confused and is the wrong way to do things.
If you don’t know to which package a file belongs, try this:
dpkg -S /path/to/file
For some applications compiled from their source codes, the best way is to refer to its README, and remove it manually.

How to install wingide

I'm trying to install wingide on a Kali Linux virtual Machine. I have downloaded the ide directly from the website, then put this code into the terminal:
dpkg -i wingide6_6.1.4-1_amd64.deb
After loading, it says exactly this:
dependency problems prevent configuration of wingide6:
wingide6 depends on libpango1.0-0 (>= 1.18.0); however:
package libpango1.0-0 is not installed
(LEAVING OUT SOME CODE)
Errors were encountered while processing:
wingide6
I assume I have to install the "libpango" software, but I don't know how to do that. Also, I don't know what it means by the last line, "error encountered".
When I try to run
apt-get -f install
It asks me if I want to delete the wingide. Shouldn't it try to install the libpango? I am very confused.
Edit
Also, when I try
sudo apt-get install libpango1.0-0
it doesn't work. It says something along the lines of "the package could be missing, has been obsoleted, or is only available from another source"
Not sure why it thinks Wing uses libpango... it doesn't. I think you can work around this like this:
dpkg --force-all -i wingide6_6.1.4-1_amd64.deb

how to update make 3.81 linux

I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I've been told to install specific versions of specific programs, but though I've used apt-get install to install them (having previously done apt-get update) they aren't in the correct version.
The programs that I need are make 4.0 and valgrind 3.10.1.
apt-get installs make 3.81 and valgrind 3.10.0.SVN.
I have tried typing "apt-get install make4.0" and "apt-get install valgrind10.3.1" to no avail. I have downloaded them from the internet and followed what instructions I could understand to install the newer versions but it keeps saying that I have the older ones. (I'm not sure if I can post direct links here, if I can let me know and I'll post where I got them from).
What have I been doing wrong? How can I fix this?
I am currently running Linux Mint.
Thanks for any answer in advance.
Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.
The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.
This has been discussed many times on the GNU Make mailing list and elsewhere.
So to get a newer version, you must compile it from scratch.
This is easy:
Install the required packages (gcc, make and such).
Open up a shell (if you're using the GUI, a terminal window).
Type the following commands (or something equivalent, e.g. you can use curl instead of wget):
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now, make 4.1 is in /usr/local/bin/make.
You can verify it is there with whereis make.
You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.
Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

Installing additional packages for Cygwin

To install additional packages for Cygwin, do I just need to run the setup.exe again and choose from the packages list?
Also, doing this won't harm my computer in terms of 2 Cygwin instances being installed or problems of that kind (I'm kind of a noobie with these things).
Last, there is no package manager in Cygwin which you can run in the command line? Something similar to Pip in Python.
No, adding additional packages doesn’t modify the current settings. There is a
package manager called apt-cyg which installes additional packages from
command-line. To install apt-cyg follow the below steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Note: wget should be installed for downloading the apt-cyg. To Use apt-cyg for
installing additional package (after following the above steps):
apt-cyg install ncurses
No, it doesn't hurt the current setup. The install program knows what's installed already.
Having said that, I long ago got into the habit of installing all of Cygwin since, despite its size, it's still minuscule compared to the size of modern hard disks. That way, you won't ever have to worry about whether a package is installed or not.
Re-run the setup executable like "cygwin_setup-x86_64.exe" should do it.
"Install from Internet"
Accept your existing root directory (from your existing installation)
Use your existing "Local Package Directory"
On the screen, view "Full"
Search for the new package you want to add
Go through the installation
Additional option, may be helpful for someone:
To install additional packages in windows from windows command line you can use your cygwin installer.
I suppose, you've already downloaded it to install cygwin from here https://cygwin.com/install.html.
$ setup-x86_64.exe -q -P graphviz
see this guide for details:
http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/
There is no package management in Cygwin outside of the setup program. The setup only applies updates to your current installation, it does not overwrite packages than what you already have.
So if you want new packages just rerun the setup program to install packages.
You can just look for the package binaries and decompress them in the C:\cygwin\bin folder.
I did that for dos2unix ( https://cygwin.com/packages/summary/dos2unix.html ) and trying it out now.

How to make Debian package install dependencies?

I want to make a simple Debian package to install a simple tool that depends on Qt4 libs.
In control file I have defined that it depends on Qt4 libs however, by the time I'm testing the package it says that the dependency could not be met.
Question:
How can I make Debian trigger apt to install the dependencies as well?
Can't find that the documentation however I know that apt-get does that.
If you want to avoid creating a local APT repository, you can do:
dpkg -i mypackage.deb
apt-get install --fix-missing
If you do want to create a local repository, you can use reprepro for this.
If you install it via dpkg it won't work because dkpg doesn't know where to find additional dependencies. You could do it via apt-get if you build your own repo, but it's kind of time-consuming the first time (it's not difficult, just something "new" the first time that needs some time to be learnt).
On the other hand, and the solution you are probably looking for is gdebi (you may need to install it: apt-get install gdebi-core). It's a tool that checks the dependencies for a package and calls apt-get to fetch and install them, and then calls dpkg to install your package.
Per #textshell in this answer:
starting with apt 1.1 (available in Xenial (16.04), stretch) apt install also allows local files:
sudo apt install ./foo-1.2.3.deb
So much simpler and cleaner.
See the release
announcment
This will also install dependencies, just like a normal apt install or apt-get install.
If you're creating the Debian package, you specify its dependencies in the debian/ directory control files; I believe debian/control takes Depends: directives for that purpose.
I don't know the details too clearly, myself, but there are instructions at http://www.debian.org/doc/manuals/maint-guide/ ; in particular, http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control seems to be the right place to start looking.
One way would be to create a local package repository on your computer and add it to /etc/apt/sources.list. Then you could install the package from your local repository with apt-get and have the dependencies resolved automatically.
There's probably an easier way to do it, but I don't know what that would be.

Resources