How do I go back to mainstream package?

Asked by Michael James

I made my own package, installed it; but now I would like to go back to the mainstream version; how do I do that?
I have tried going to /var/cache/apt/archives and trying to re-install it but it says that a later version is installed.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Christophe Painchaud
Solved:
Last query:
Last reply:
Revision history for this message
Christophe Painchaud (dash-ionblast) said :
#1

Hello, you can use 'dpkg -r mypackagename' and then do a usual apt-get install ....

Revision history for this message
Michael James (mbj1103) said :
#2

It isn't as easy that for me, as it has dependencies, the package is gnome-system-tools and the dependences are ubuntu-desktop and fast-user-switch-applet. I would like to replace it with the current version. The current version is not in the main part of synaptic but in the section of "local or obsolete".

Revision history for this message
Christophe Painchaud (dash-ionblast) said :
#3

Then download the .deb you wish to install and use 'dpkg --force-all myfile.deb'

Revision history for this message
Christophe Painchaud (dash-ionblast) said :
#4

or try 'apt-get --reinstall install mypackage'

Revision history for this message
Michael James (mbj1103) said :
#5

I get this output when I try to install it:
michael@michael-laptop:~$ sudo dpkg --force-all /var/cache/apt/archives/gnome-system-tools_2.22.0-0ubuntu9_i386.deb
dpkg: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

Options marked [*] produce a lot of output - pipe it through `less' or `more' !

Revision history for this message
Christophe Painchaud (dash-ionblast) said :
#6

'dpkg --force-all -i myfile.deb'

or

'apt-get --reinstall install mypackage'

Revision history for this message
Best Christophe Painchaud (dash-ionblast) said :
#7

'dpkg --force-all -i myfile.deb' (I forgot -i)

or

'apt-get --reinstall install mypackage'

Revision history for this message
Michael James (mbj1103) said :
#8

Thanks Christophe Painchaud, that solved my question.