Alright, I got it fixed. I had to manually remove the package and then force dpkg to clear itself. Afterwards I installed it from git-core and that worked fine. To manually remove the package I went to
/var/cache/apt/archives
And removed git_1%3a1.7.4.1-3_i386.deb
file. After that I went to
/var/lib/dpkg/info
And did an ls | grep git
and removed everything that turned up. Afterwards, I ran
sudo dpkg --remove --force-remove-reinstreq git
To clean dpkg of the package. Once that was done I was able to install git from git-core
instead of the git
package and it worked just fine.
Your older version must satisfy two criteria.
1) The old version must be in a repository that apt can see.
2) The old version must not break other software on your system.
Your error messages, especially errors about 'held broken package' indicate a version conflict. A version conflict means that the old package violates #2, and is about to break other parts of your system.
Dependencies like foo 1.1 depends upon libfoo(>0.98)
are set by the packager of the software when they create the package. Packagers are volunteers - you can learn to do it, too.
Lazy packagers simply use the current dependencies they have on hand. Example: foo 1.1 depends upon libfoo(=1.1)
. That lack of flexibility in dependency versions causes lots of problems for users. Lazy packages are found in many PPAs and other non-Ubuntu sourced software, and are one reason those are unsupported sources.
More experienced packagers will test their packages to achieve functionality with the widest range of dependency versions. Example: foo 1.1 depends upon libfoo(>=0.75)
. These packages are usually found in Debian and imported into Ubuntu each release cycle.
Distros like Debian and Ubuntu are 'snapshot' distros. Each release is based on a single stable snapshot. Older snapshots are in older releases. Since versions change constantly, this usually means that many packages are compatible ONLY with the release they are built for.
If you want to run older packages, you must often do so in an older release of Ubuntu (using a VM, for example). You CAN install older software on any you system you wish...but not by using packages.
Best Answer
Yes, those commands are valid. Moreover, they are equivalent because
purge
is equivalent withremove --purge
(seeman apt-get
).